diff --git a/confiture-rest-api/prisma/schema.prisma b/confiture-rest-api/prisma/schema.prisma index bded5da5..c21ee1b5 100644 --- a/confiture-rest-api/prisma/schema.prisma +++ b/confiture-rest-api/prisma/schema.prisma @@ -189,7 +189,9 @@ model StoredFile { key String thumbnailKey String + /// @DtoEntityHidden criterionResult CriterionResult? @relation(fields: [criterionResultId], references: [id], onDelete: Cascade, onUpdate: Cascade) + /// @DtoEntityHidden criterionResultId Int? } diff --git a/confiture-rest-api/src/audits/audits.controller.ts b/confiture-rest-api/src/audits/audits.controller.ts index d47cbff5..38b7de12 100644 --- a/confiture-rest-api/src/audits/audits.controller.ts +++ b/confiture-rest-api/src/audits/audits.controller.ts @@ -40,6 +40,7 @@ import { AuthRequired } from "src/auth/auth-required.decorator"; import { User } from "src/auth/user.decorator"; import { AuthenticationJwtPayload } from "src/auth/jwt-payloads"; import { AuditListingItemDto } from "./dto/audit-listing-item.dto"; +import { StoredFile } from "src/generated/nestjs-dto/storedFile.entity"; @Controller("audits") @ApiTags("Audits") @@ -148,6 +149,7 @@ export class AuditsController { @Post("/:uniqueId/results/examples") @UseInterceptors(FileInterceptor("image")) + @ApiCreatedResponse({ type: StoredFile }) async uploadExampleImage( @Param("uniqueId") uniqueId: string, @UploadedFile(