fix admin note is required in mentor
This commit is contained in:
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user