You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

16 lines
459 B

import { Injectable } from '@nestjs/common';
import { PrismaService } from './prisma.service';
@Injectable()
export class ImpersonationService {
public constructor(private readonly prismaService: PrismaService) {}
public async validateImpersonationId(aId = '', aUserId: string) {
const accessObject = await this.prismaService.access.findFirst({
where: { GranteeUser: { id: aUserId }, id: aId }
});
return accessObject?.userId;
}
}