File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed
Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change 11import { z } from 'zod' ;
22import { Injectable } from '@nestjs/common' ;
33import * as qs from 'qs' ;
4- import { Prisma , AccessLevel } from '@prisma/client' ;
4+ import { Prisma } from '@prisma/client' ;
55import { DefaultArgs } from '@prisma/client/runtime/library' ;
66
77import { PrismaService } from '../prisma/prisma.service' ;
@@ -14,7 +14,6 @@ import { SearchSchema } from '../types';
1414import { ShelterSearch , parseTagResponse } from './ShelterSearch' ;
1515import { SupplyPriority } from '../supply/types' ;
1616import { IFilterFormProps } from './types/search.types' ;
17- import { isRightSessionRole } from '@/guards/utils' ;
1817
1918@Injectable ( )
2019export class ShelterService {
@@ -62,11 +61,8 @@ export class ShelterService {
6261 }
6362
6463 async show ( id : string , user : any ) {
65- const isLogged = await isRightSessionRole (
66- [ AccessLevel . User , AccessLevel . Staff ] ,
67- user ?. sessionId ,
68- user ?. userId ,
69- ) ;
64+ const isLogged =
65+ Boolean ( user ) && Boolean ( user ?. sessionId ) && Boolean ( user ?. userId ) ;
7066
7167 const data = await this . prismaService . shelter . findFirst ( {
7268 where : {
You can’t perform that action at this time.
0 commit comments