add /auth/patch endpoint

This commit is contained in:
2023-07-17 00:12:17 +02:00
parent 111ca55cbf
commit 8d33fce53d
7 changed files with 120 additions and 4 deletions

View File

@@ -95,6 +95,17 @@ export class UsersRepository {
}
}
async updateUser(id: string, data: Prisma.userUpdateInput): Promise<User> {
try {
return await this.prisma.user.update({
where: { id },
data,
})
} catch (e) {
this.logger.error(e?.message || e)
throw new InternalServerErrorException(e)
}
}
async deleteUserById(id: string): Promise<boolean> {
try {
const result = await this.prisma.user.delete({