mirror of
https://github.com/BradNut/TofuStack
synced 2025-09-08 17:40:26 +00:00
added $onUpdate for updatedAt timestamp
This commit is contained in:
parent
3eef0bab38
commit
b1af2c3680
2 changed files with 2 additions and 1 deletions
|
|
@ -26,4 +26,5 @@ export const timestamps = {
|
|||
})
|
||||
.notNull()
|
||||
.defaultNow()
|
||||
.$onUpdate(() => new Date())
|
||||
};
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ export const actions = {
|
|||
const verifyEmailForm = await superValidate(request, zod(verifyEmailFormSchema));
|
||||
console.log(verifyEmailForm)
|
||||
if (!verifyEmailForm.valid) return fail(StatusCodes.BAD_REQUEST, { verifyEmailForm })
|
||||
const { error } = await locals.api.iam.email.verification.$post({ json: verifyEmailForm.data }).then(locals.parseApiResponse);
|
||||
const { error } = await locals.api.iam.email.verify.$post({ json: verifyEmailForm.data }).then(locals.parseApiResponse);
|
||||
if (error) return setError(verifyEmailForm, 'token', error);
|
||||
return { verifyEmailForm }
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue