format code

This commit is contained in:
unclebonn
2024-11-19 16:12:39 +07:00
parent 9a134645a7
commit 4e6ade0679

View File

@@ -170,8 +170,6 @@ export class UserSchema extends PothosSchema {
}
let user = ctx.http.me as UserWithChatRooms
console.log("hahahahahaha")
if (!user?.name) {
throw new Error('User not found')
}
@@ -214,12 +212,10 @@ export class UserSchema extends PothosSchema {
type: this.user(),
args: this.builder.generator.findUniqueArgs('User'),
resolve: async (query, _root, args) => {
const user = await this.prisma.user.findUniqueOrThrow({
return await this.prisma.user.findUniqueOrThrow({
...query,
where: args.where,
})
return user;
},
}),
userBySession: t.prismaField({