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 1
1
import { z } from 'zod' ;
2
2
import { Injectable } from '@nestjs/common' ;
3
3
import * as qs from 'qs' ;
4
- import { Prisma , AccessLevel } from '@prisma/client' ;
4
+ import { Prisma } from '@prisma/client' ;
5
5
import { DefaultArgs } from '@prisma/client/runtime/library' ;
6
6
7
7
import { PrismaService } from '../prisma/prisma.service' ;
@@ -14,7 +14,6 @@ import { SearchSchema } from '../types';
14
14
import { ShelterSearch , parseTagResponse } from './ShelterSearch' ;
15
15
import { SupplyPriority } from '../supply/types' ;
16
16
import { IFilterFormProps } from './types/search.types' ;
17
- import { isRightSessionRole } from '@/guards/utils' ;
18
17
19
18
@Injectable ( )
20
19
export class ShelterService {
@@ -62,11 +61,8 @@ export class ShelterService {
62
61
}
63
62
64
63
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 ) ;
70
66
71
67
const data = await this . prismaService . shelter . findFirst ( {
72
68
where : {
You can’t perform that action at this time.
0 commit comments