Restructure codebase to use src directory

This commit is contained in:
Aaron William Po
2023-04-11 23:32:06 -04:00
parent 90f2cc2c0c
commit 08422fe24e
141 changed files with 6 additions and 4 deletions

View File

@@ -0,0 +1,24 @@
import GetUserSchema from '@/services/User/schema/GetUserSchema';
import DBClient from '@/prisma/DBClient';
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() },
select: {
id: true,
username: true,
email: true,
isAccountVerified: true,
createdAt: true,
firstName: true,
lastName: true,
dateOfBirth: true,
},
});
return user;
};
export default updateUserToBeConfirmedById;