fix admin note is required in mentor

This commit is contained in:
2024-10-29 19:49:22 +07:00
parent e003bcd634
commit 8631bd935d
5 changed files with 32 additions and 23 deletions

View File

@@ -135,7 +135,7 @@ export class UserSchema extends PothosSchema {
me: t.prismaField({
description: 'Retrieve the current user in context.',
type: this.user(),
resolve: async (query, root, args, ctx) => {
resolve: async (_query, _root, _args, ctx) => {
if (ctx.isSubscription) {
throw new Error('Not allowed')
}
@@ -148,7 +148,7 @@ export class UserSchema extends PothosSchema {
'Retrieve a list of users with optional filtering, ordering, and pagination.',
type: [this.user()],
args: this.builder.generator.findManyArgs('User'),
resolve: async (query, root, args) => {
resolve: async (query, _root, args) => {
return await this.prisma.user.findMany({
...query,
take: args.take ?? undefined,
@@ -163,7 +163,7 @@ export class UserSchema extends PothosSchema {
description: 'Retrieve a single user by their unique identifier.',
type: this.user(),
args: this.builder.generator.findUniqueArgs('User'),
resolve: async (query, root, args) => {
resolve: async (query, _root, args) => {
return await this.prisma.user.findUniqueOrThrow({
...query,
where: args.where,
@@ -176,7 +176,7 @@ export class UserSchema extends PothosSchema {
args: {
sessionId: t.arg({ type: 'String', required: true }),
},
resolve: async (query, root, args) => {
resolve: async (query, _root, args) => {
// check if the token is valid
const session = await clerkClient.sessions.getSession(args.sessionId)
Logger.log(session, 'Session')