-
Notifications
You must be signed in to change notification settings - Fork 38
Expand file tree
/
Copy pathApiBinaryContentController.java
More file actions
24 lines (20 loc) · 1 KB
/
ApiBinaryContentController.java
File metadata and controls
24 lines (20 loc) · 1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package com.sprint.mission.discodeit.binarycontent.controller;
import com.sprint.mission.discodeit.binarycontent.entity.BinaryContent;
import com.sprint.mission.discodeit.binarycontent.service.BinaryContentService;
import lombok.RequiredArgsConstructor;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.util.UUID;
@RequiredArgsConstructor
@RestController
@RequestMapping("/api/binaryContent")
public class ApiBinaryContentController {
private final BinaryContentService binaryContentService;
@RequestMapping(value = "/find", method = RequestMethod.GET)
public ResponseEntity<BinaryContent> findBinaryContent(@RequestParam UUID binaryContentId) {
return ResponseEntity.ok(binaryContentService.findBinaryContentEntity(binaryContentId));
}
}