-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathInstallationController.java
More file actions
33 lines (26 loc) · 1.25 KB
/
InstallationController.java
File metadata and controls
33 lines (26 loc) · 1.25 KB
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
32
33
// Alternative approach - map both old and new paths to the same endpoint
// This would go in your actual API controller, not the redirect controller
@RestController
public class InstallationController {
// This maps BOTH old and new paths to the same method
@RequestMapping(value = {"/api/installation", "/api/installations"})
public ResponseEntity<String> getInstallations() {
// Your actual implementation
return ResponseEntity.ok("Installations data");
}
@RequestMapping(value = {"/api/installation/status", "/api/installations/status"})
public ResponseEntity<String> getInstallationStatus() {
// Your actual implementation
return ResponseEntity.ok("Installation status");
}
@RequestMapping(value = {"/api/installation/metrics", "/api/installations/metrics"})
public ResponseEntity<String> getInstallationMetrics() {
// Your actual implementation
return ResponseEntity.ok("Installation metrics");
}
@RequestMapping(value = {"/api/installation/metrics/monthly", "/api/installations/metrics/monthly"})
public ResponseEntity<String> getInstallationMetricsMonthly() {
// Your actual implementation
return ResponseEntity.ok("Installation metrics");
}
}