-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathAdminController.java
More file actions
31 lines (20 loc) · 893 Bytes
/
AdminController.java
File metadata and controls
31 lines (20 loc) · 893 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package com.revature.controllers;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import com.revature.services.PersonLogic;
@CrossOrigin
@RestController
@RequestMapping(value = "/api/v1/admin/")
public class AdminController {
@Autowired
private PersonLogic personLogic;
@RequestMapping(method = RequestMethod.DELETE, value = "persons/{personId}")
public ResponseEntity<String> deletePerson(@PathVariable Integer personId){
return ResponseEntity.ok(personLogic.deletePersonAdmin(personId));
}
}