forked from Yara724/api
Fix 404 for invalid email of actors, added APIs for client settings
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user