Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,38 @@ public HttpResponse<FontModelResponseDTO> getById(@PathVariable UUID projectId,
return HttpResponse.notFound(new FontModelErrorDTO("Font not found"));
}

@Operation(
summary = "Update an existing font",
operationId = "updateFont",
description = "Updates a font in the given project.",
tags = {"Font"}
)
@ApiResponse(
responseCode = "200",
description = "The font was successfully updated.",
content = @Content(
mediaType = MediaType.APPLICATION_JSON,
schema = @Schema(implementation = FontModelResponseDTO.FontModelDTO.class)
)
)
@ApiResponse(
responseCode = "404",
description = "The font or project was not found.",
content = @Content(
mediaType = MediaType.APPLICATION_JSON,
schema = @Schema(implementation = FontModelErrorDTO.class)
)
)
@Post("/update")
@Produces(MediaType.APPLICATION_JSON)
public HttpResponse<FontModelResponseDTO> update(@PathVariable UUID projectId, @Body FontModelDTO item) {
FontModelResponseDTO result = fontService.update(projectId, item);
if (result instanceof FontModelErrorDTO) {
return HttpResponse.notFound(result);
}
return HttpResponse.ok(result);
}

@Operation(
summary = "Remove a font by ID",
operationId = "deleteFont",
Expand Down
Loading