refactor and update get url logic

This commit is contained in:
2024-10-17 17:02:03 +07:00
parent 4721077370
commit f9967ac5bd
22 changed files with 45 additions and 40 deletions

View File

@@ -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],

View File

@@ -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: {