Add refData controller.
This commit is contained in:
@@ -0,0 +1,18 @@
|
|||||||
|
package org.cerberus.controllers;
|
||||||
|
|
||||||
|
import org.cerberus.core.constant.Role;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/api/refData")
|
||||||
|
public class RefDataController {
|
||||||
|
@GetMapping("/roles")
|
||||||
|
public List<Role> getRoles() {
|
||||||
|
return Arrays.asList(Role.values());
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user