fix: fixes after review
Skeleton contracts / contracts (pull_request) Canceled after 0s

This commit is contained in:
2026-10-22 12:41:28 +03:00
parent 07661cfe82
commit 5146ca8419
8 changed files with 112 additions and 11 deletions
+5
View File
@@ -8,6 +8,7 @@ import {
UseGuards,
} from '@nestjs/common';
import { FastifyRequest } from 'fastify';
import { ApiError } from '../common/filters/api-error';
import { toUserResponse, UserResponse } from '../users/dto/user.response';
import { AuthGuard } from './auth.guard';
import { AuthService } from './auth.service';
@@ -27,7 +28,11 @@ export class AuthController {
@HttpCode(201)
async create(
@Headers('authorization') authorization: string | undefined,
@Req() request: FastifyRequest,
): Promise<SessionResponse> {
if (request.body !== undefined) {
throw new ApiError('invalid_request', 'request body is not allowed');
}
const session = await this.auth.login(authorization);
return {
token: session.token,