refactor and update get url logic
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import { Global, Module } from '@nestjs/common';
|
||||
import { Module } from '@nestjs/common';
|
||||
import { UserSchema } from './user.schema';
|
||||
@Global()
|
||||
@Module({
|
||||
providers: [UserSchema],
|
||||
exports: [UserSchema],
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Inject, Injectable } from '@nestjs/common';
|
||||
import { Inject, Injectable, Logger } from '@nestjs/common';
|
||||
import {
|
||||
Pothos,
|
||||
PothosRef,
|
||||
@@ -99,7 +99,7 @@ export class UserSchema extends PothosSchema {
|
||||
resolve: async (query, root, args, ctx, info) => {
|
||||
// check if the token is valid
|
||||
const session = await clerkClient.sessions.getSession(args.sessionId);
|
||||
console.log(session);
|
||||
Logger.log(session, 'Session');
|
||||
return await this.prisma.user.findFirst({
|
||||
...query,
|
||||
where: {
|
||||
|
||||
Reference in New Issue
Block a user