From 4b8b5f266e209f9a2e02f013d6440026a789d5e8 Mon Sep 17 00:00:00 2001 From: Adrien Boutigny Date: Fri, 13 Dec 2024 16:57:32 +0100 Subject: [PATCH] hide some props --- confiture-rest-api/prisma/schema.prisma | 2 ++ confiture-rest-api/src/audits/audits.controller.ts | 2 ++ 2 files changed, 4 insertions(+) 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(