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.
ghostfolio/apps/api/src/services/impersonation.service.ts

17 lines
436 B

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