Skip to content
Snippets Groups Projects
Verified Commit 76d5a6f6 authored by Adrian Paschkowski's avatar Adrian Paschkowski :thinking:
Browse files

Fix: Throw error on invalid login credentials

parent b46b7724
No related branches found
No related tags found
No related merge requests found
......@@ -3,6 +3,7 @@ import { LoginModel } from './models/login.model';
import { PrismaService } from '../prisma/prisma.service';
import { randomBytes } from 'crypto';
import { AgentFlags } from './models/agent.model';
import { BadRequestException } from '@nestjs/common';
@Resolver()
export class AuthResolver {
......@@ -30,6 +31,9 @@ export class AuthResolver {
role = 'group';
}
if (!entityId || !role)
throw new BadRequestException('Invalid Login Slug');
return await this.prisma.accessToken.create({
data: {
entityId,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment