forked from Yara724/api
update the blame service
This commit is contained in:
@@ -51,7 +51,7 @@ import { RequestManagementService } from "./request-management.service";
|
||||
export class RequestManagementV2Controller {
|
||||
constructor(
|
||||
private readonly requestManagementService: RequestManagementService,
|
||||
) {}
|
||||
) { }
|
||||
|
||||
@Post()
|
||||
@UseGuards(GlobalGuard)
|
||||
@@ -65,6 +65,14 @@ export class RequestManagementV2Controller {
|
||||
);
|
||||
}
|
||||
|
||||
@Get()
|
||||
@Roles(RoleEnum.USER, RoleEnum.FIELD_EXPERT)
|
||||
async getAllBlameRequestsV2(
|
||||
@CurrentUser() user: any,
|
||||
) {
|
||||
return this.requestManagementService.getAllBlameRequestsV2(user);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get one blame request by id. Allowed for the request owner (party) or the initiating field expert.
|
||||
*/
|
||||
@@ -324,10 +332,10 @@ export class RequestManagementV2Controller {
|
||||
@UploadedFile() sign: Express.Multer.File,
|
||||
) {
|
||||
// Convert string "true"/"false" to boolean
|
||||
const acceptDecision = typeof isAccept === "string"
|
||||
? isAccept === "true"
|
||||
const acceptDecision = typeof isAccept === "string"
|
||||
? isAccept === "true"
|
||||
: Boolean(isAccept);
|
||||
|
||||
|
||||
return this.requestManagementService.userSignDecisionV2(
|
||||
requestId,
|
||||
user.sub,
|
||||
|
||||
Reference in New Issue
Block a user