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