mirror of
https://github.com/aaronpo97/the-biergarten-app.git
synced 2026-02-16 20:13:49 +00:00
Updates to user schema, account page
Renamed isAccountVerified to accountIsVerified, add account info to account page
This commit is contained in:
@@ -30,7 +30,7 @@ const createNewUser = async ({
|
||||
lastName: true,
|
||||
dateOfBirth: true,
|
||||
createdAt: true,
|
||||
isAccountVerified: true,
|
||||
accountIsVerified: true,
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ const findUserById = async (id: string) => {
|
||||
lastName: true,
|
||||
dateOfBirth: true,
|
||||
createdAt: true,
|
||||
isAccountVerified: true,
|
||||
accountIsVerified: true,
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ const GetUserSchema = z.object({
|
||||
firstName: z.string(),
|
||||
lastName: z.string(),
|
||||
dateOfBirth: z.coerce.date(),
|
||||
isAccountVerified: z.boolean(),
|
||||
accountIsVerified: z.boolean(),
|
||||
});
|
||||
|
||||
export default GetUserSchema;
|
||||
|
||||
@@ -5,12 +5,12 @@ import { z } from 'zod';
|
||||
const updateUserToBeConfirmedById = async (id: string) => {
|
||||
const user: z.infer<typeof GetUserSchema> = await DBClient.instance.user.update({
|
||||
where: { id },
|
||||
data: { isAccountVerified: true, updatedAt: new Date() },
|
||||
data: { accountIsVerified: true, updatedAt: new Date() },
|
||||
select: {
|
||||
id: true,
|
||||
username: true,
|
||||
email: true,
|
||||
isAccountVerified: true,
|
||||
accountIsVerified: true,
|
||||
createdAt: true,
|
||||
firstName: true,
|
||||
lastName: true,
|
||||
|
||||
Reference in New Issue
Block a user