1
0
forked from Yara724/api

Fix 404 for invalid email of actors, added APIs for client settings

This commit is contained in:
SepehrYahyaee
2026-05-16 15:47:31 +03:30
parent 7c76149c95
commit 7797a4ddab
8 changed files with 484 additions and 47 deletions

View File

@@ -31,7 +31,6 @@ import {
LegalRegisterDto,
} from "src/auth/dto/actor/register.actor.dto";
import { LocalActorAuthGuard } from "src/auth/guards/actor-local.guard";
import { ClientKey } from "src/decorators/clientKey.decorator";
import { Roles } from "src/decorators/roles.decorator";
import { CurrentUser } from "src/decorators/user.decorator";
@@ -136,9 +135,17 @@ export class ActorAuthController {
},
},
})
@ApiResponse({
status: 404,
description: "No actor account exists for the given email and role",
})
@ApiResponse({
status: 401,
description: "Wrong password or role mismatch",
})
@ApiAcceptedResponse()
async login(@Body() body, @Req() req, @ClientKey() client) {
return await this.actorAuthService.loginActors(req.user);
async login(@Req() req: { user: Record<string, unknown> }) {
return req.user;
}
@Post("forget-password")