Skip to content

Commit

Permalink
chore: various
Browse files Browse the repository at this point in the history
  • Loading branch information
stagas committed Oct 3, 2024
1 parent f5633de commit c2ccb1e
Show file tree
Hide file tree
Showing 6 changed files with 167 additions and 9 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,9 @@
- [x] Vite
- [x] Sigui
- [x] Tailwindcss
- [ ] Testing
- [ ] Unit
- [x] Testing
- [x] Coverage
- [x] Unit
- [ ] Integration
- [ ] E2E
- [x] HMR
Expand Down
2 changes: 1 addition & 1 deletion api/actions/login-register.ts
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ export async function getResetPasswordUser(_ctx: Context, token: string) {
if (result.value) {
const user = await getUserByNick(result.value)
if (user) {
// @ts-ignore remove password from entry
// @ts-ignore remove password before returning
delete user.password
return user as Omit<User, 'password'>
}
Expand Down
161 changes: 159 additions & 2 deletions api/deno.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions lib/rpc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ export type RpcFn<T extends (...args: never[]) => unknown> =
? (...args: U) => V
: never

type RpcMethods = 'GET' | 'POST'
type RpcMethod = 'GET' | 'POST'
type RpcResponse = {
error?: string
} | null | undefined

const headers = { 'content-type': 'application/json' }

export function rpc<T extends (...args: any[]) => any>(
method: RpcMethods,
method: RpcMethod,
fn: string,
) {
return async function (...args: unknown[]) {
Expand Down
2 changes: 1 addition & 1 deletion src/comp/VerifyEmail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export function VerifyEmail() {

actions
.verifyEmail(token)
.then(user => info.isVerified = true)
.then(() => info.isVerified = true)
.catch(err => info.error = err.message)

return <div>{
Expand Down
2 changes: 1 addition & 1 deletion src/ui/Link.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export function go(href: string) {
}

export function Link({ href, children }: { href: string, children?: any }) {
return <a href="#" onclick={ev => {
return <a href={href} onclick={ev => {
ev.preventDefault()
go(href)
}}>{children}</a>
Expand Down

0 comments on commit c2ccb1e

Please sign in to comment.