fix: made endpoints match documentation naming conventions 'just the mapping' and noted endpoints not yet implemented in documentation/openapi/notes.md
Some checks failed
Format / formatting (push) Failing after 6s
Build / build (push) Successful in 40s
CI / build (push) Successful in 11s

This commit is contained in:
2025-04-21 23:55:14 +02:00
parent 561f6d16b3
commit 8a13993d8a
9 changed files with 38 additions and 113 deletions

View File

@ -57,7 +57,7 @@ public class AdminApi {
*
* @return the status code of the request
*/
@PostMapping("/admin/projects/decision")
@PostMapping("/admin/projects/pending/decision")
public void validateProject(@RequestBody ProjectDecision decision) {
adminApiService.validateProject(decision);
}
@ -67,7 +67,7 @@ public class AdminApi {
*
* @return the status code of the request
*/
@PostMapping("/admin/project/add")
@PostMapping("/admin/project")
public void addNewProject(@RequestBody Project project) {
adminApiService.addNewProject(project);
}
@ -79,7 +79,7 @@ public class AdminApi {
*
* @return the status code of the request
*/
@PostMapping("/admin/appoitements/report/{appointmentId}")
@PostMapping("/admin/appointments/report/{appointmentId}")
public void createAppointmentReport(
@PathVariable long appointmentId,
@RequestBody Report report,
@ -95,23 +95,23 @@ public class AdminApi {
*
* @return the status code of the request
*/
@DeleteMapping("/admin/projects/remove/{projectId}")
@DeleteMapping("/admin/projects/{projectId}")
public void deleteProject(@PathVariable long projectId) {
adminApiService.deleteProject(projectId);
}
@GetMapping("/admin/setadmin/{userId}")
@PostMapping("/admin/make-admin/{userId}")
public void setAdmin(@PathVariable long userId, @AuthenticationPrincipal Jwt principal) {
this.adminApiService.setAdmin(userId, principal.getTokenValue());
}
@GetMapping("/admin/validate_user_account/{userId}")
@PostMapping("/admin/accounts/validate/{userId}")
public void validateEntrepreneurAcc(
@PathVariable long userId, @AuthenticationPrincipal Jwt principal) {
this.adminApiService.validateEntrepreneurAccount(userId, principal.getTokenValue());
}
@GetMapping("/admin/get_pending_accounts")
@GetMapping("/admin/pending-accounts")
public Iterable<User> validateEntrepreneurAcc() {
return this.adminApiService.getPendingUsers();
}