Skip to content

Commit ed4c76a

Browse files
authored
fix: remove unnecessary @Valid annotation from get method (#38)
* fix(SoundController): remove unnecessary @Valid annotation from get method * fix(SoundController): remove unnecessary @Valid annotation from source methods
1 parent e030a6e commit ed4c76a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/main/java/net/onelitefeather/vulpes/backend/controller/SoundController.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ public HttpResponse<SoundResponseDTO> update(@Body @Valid SoundEventDTO model) {
259259
)
260260
@Get("{id}/sources")
261261
@Produces(MediaType.APPLICATION_JSON)
262-
public HttpResponse<Page<SoundResponseDTO>> get(@Valid @PathVariable UUID id, Pageable pageable) {
262+
public HttpResponse<Page<SoundResponseDTO>> get(@PathVariable UUID id, Pageable pageable) {
263263
Page<SoundResponseDTO> result = soundService.getSoundSourcesById(id, pageable);
264264
return HttpResponse.ok(result);
265265
}
@@ -296,7 +296,7 @@ public HttpResponse<Page<SoundResponseDTO>> get(@Valid @PathVariable UUID id, Pa
296296
@Post("{id}/sources")
297297
@Produces(MediaType.APPLICATION_JSON)
298298
public HttpResponse<SoundResponseDTO> createSource(
299-
@Valid @PathVariable("id") UUID soundEventId,
299+
@PathVariable("id") UUID soundEventId,
300300
@Body SoundFileSourceDTO sourceDTO
301301
) {
302302
SoundResponseDTO result = soundService.createAndLinkSource(soundEventId, sourceDTO);
@@ -335,7 +335,7 @@ public HttpResponse<SoundResponseDTO> createSource(
335335
@Post("{id}/sources/update")
336336
@Produces(MediaType.APPLICATION_JSON)
337337
public HttpResponse<SoundResponseDTO> updateSource(
338-
@Valid @PathVariable("id") UUID soundEventId,
338+
@PathVariable("id") UUID soundEventId,
339339
@Body SoundFileSourceDTO sourceDTO
340340
) {
341341
SoundResponseDTO result = soundService.updateLinkedSource(soundEventId, sourceDTO);
@@ -375,7 +375,7 @@ public HttpResponse<SoundResponseDTO> updateSource(
375375
@Delete("{id}/sources/delete")
376376
@Produces(MediaType.APPLICATION_JSON)
377377
public HttpResponse<SoundResponseDTO> deleteSource(
378-
@Valid @PathVariable("id") UUID soundEventId,
378+
@PathVariable("id") UUID soundEventId,
379379
@Body SoundFileSourceDTO sourceDTO
380380
) {
381381
SoundResponseDTO result = soundService.deleteLinkedSource(soundEventId, sourceDTO);

0 commit comments

Comments
 (0)