0.0.11, enable cors
This commit is contained in:
1 parent
68ab91e4fc
commit
ac328d8cef
13 files changed
+69
-12
No files matched your search
+3
-4
@@ -3,10 +3,7 @@ package site.easystartup.web.notification.controller;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import site.easystartup.web.notification.domian.Notification;
|
||||
import site.easystartup.web.notification.repo.NotificationRepo;
|
||||
import site.easystartup.web.notification.service.NotificationService;
|
||||
@@ -19,11 +16,13 @@ import java.util.List;
|
||||
public class NotificationRestController {
|
||||
private final NotificationService notificationService;
|
||||
|
||||
//@
|
||||
@GetMapping("/notifications/{username}")
|
||||
public ResponseEntity<List<Notification>> notification(@PathVariable String username, Principal principal) {
|
||||
return ResponseEntity.ok().body(notificationService.getNotificationByRecipient(username, principal));
|
||||
}
|
||||
|
||||
//@
|
||||
@DeleteMapping("/notifications/{id}/delete")
|
||||
public void delete(@PathVariable long id,
|
||||
Principal principal) {
|
||||
|
||||
Reference in new issue
Block a user