fix: return 204 No Content from restart endpoints
Empty 200 responses caused JSON parse errors in the API client. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -73,7 +73,7 @@ public class TenantPortalController {
|
|||||||
@PostMapping("/server/restart")
|
@PostMapping("/server/restart")
|
||||||
public ResponseEntity<Void> restartServer() {
|
public ResponseEntity<Void> restartServer() {
|
||||||
portalService.restartServer();
|
portalService.restartServer();
|
||||||
return ResponseEntity.ok().build();
|
return ResponseEntity.noContent().build();
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/settings")
|
@GetMapping("/settings")
|
||||||
|
|||||||
@@ -113,7 +113,7 @@ public class VendorTenantController {
|
|||||||
public ResponseEntity<Void> restart(@PathVariable UUID id) {
|
public ResponseEntity<Void> restart(@PathVariable UUID id) {
|
||||||
try {
|
try {
|
||||||
vendorTenantService.restartServer(id);
|
vendorTenantService.restartServer(id);
|
||||||
return ResponseEntity.ok().build();
|
return ResponseEntity.noContent().build();
|
||||||
} catch (IllegalArgumentException e) {
|
} catch (IllegalArgumentException e) {
|
||||||
return ResponseEntity.notFound().build();
|
return ResponseEntity.notFound().build();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user