forked from Yara724/api
YARA-898
This commit is contained in:
@@ -24,6 +24,7 @@ import { LocalActorAuthGuard } from "src/auth/guards/actor-local.guard";
|
||||
import { RolesGuard } from "src/auth/guards/role.guard";
|
||||
import { CurrentUser } from "src/decorators/user.decorator";
|
||||
import { Roles } from "src/decorators/roles.decorator";
|
||||
import { MediaPolicyService } from "src/media-policy/media-policy.service";
|
||||
import { RoleEnum } from "src/Types&Enums/role.enum";
|
||||
import { RequestManagementService } from "./request-management.service";
|
||||
import { CreateExpertInitiatedFileDto } from "./dto/expert-initiated.dto";
|
||||
@@ -53,6 +54,7 @@ export class ExpertInitiatedV2Controller {
|
||||
constructor(
|
||||
private readonly requestManagementService: RequestManagementService,
|
||||
private readonly claimRequestManagementService: ClaimRequestManagementService,
|
||||
private readonly mediaPolicyService: MediaPolicyService,
|
||||
) {}
|
||||
|
||||
@Get("my-files")
|
||||
@@ -393,6 +395,7 @@ export class ExpertInitiatedV2Controller {
|
||||
@Param("requestId") requestId: string,
|
||||
@UploadedFile() file?: Express.Multer.File,
|
||||
) {
|
||||
await this.mediaPolicyService.assertForBlame(file, requestId, "video");
|
||||
return this.requestManagementService.expertUploadVideoForBlameV2(
|
||||
expert,
|
||||
requestId,
|
||||
@@ -432,6 +435,7 @@ export class ExpertInitiatedV2Controller {
|
||||
@Param("requestId") requestId: string,
|
||||
@UploadedFile() voice?: Express.Multer.File,
|
||||
) {
|
||||
await this.mediaPolicyService.assertForBlame(voice, requestId, "voice");
|
||||
return this.requestManagementService.expertUploadVoiceForBlameV2(
|
||||
expert,
|
||||
requestId,
|
||||
@@ -497,6 +501,8 @@ export class ExpertInitiatedV2Controller {
|
||||
@Body() body: { partyRole?: string; isAccept?: string | boolean },
|
||||
@UploadedFile() sign?: Express.Multer.File,
|
||||
) {
|
||||
await this.mediaPolicyService.assertForBlame(sign, requestId, "image");
|
||||
|
||||
const partyRole = (body.partyRole === "FIRST" || body.partyRole === "SECOND")
|
||||
? body.partyRole
|
||||
: ("FIRST" as const);
|
||||
|
||||
Reference in New Issue
Block a user