feat: implemented most of the backend api for administrator
This commit is contained in:
@ -26,8 +26,8 @@ public class AdminApi {
|
||||
* @return a list of all project managed by the current admin user
|
||||
*/
|
||||
@GetMapping("/admin/projects")
|
||||
public Iterable<Administrator> getProjects() {
|
||||
return adminApiService.getProjects();
|
||||
public Iterable<Project> getProjects(@AuthenticationPrincipal Jwt principal) {
|
||||
return adminApiService.getProjectsOfAdmin(principal.getClaimAsString("email"));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -53,7 +53,7 @@ public class AdminApi {
|
||||
/**
|
||||
* Endpoint used to make a decision about a project.
|
||||
*
|
||||
* <p>The decision must contains the administrator
|
||||
* <p>The decision must contain the administrator
|
||||
*
|
||||
* @return the status code of the request
|
||||
*/
|
||||
@ -96,7 +96,7 @@ public class AdminApi {
|
||||
* @return the status code of the request
|
||||
*/
|
||||
@DeleteMapping("/admin/projects/remove/{projectId}")
|
||||
public void deleteProject(@PathVariable String projectId) {
|
||||
public void deleteProject(@PathVariable long projectId) {
|
||||
adminApiService.deleteProject(projectId);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user