mirror of
https://github.com/Stirling-Tools/Stirling-PDF.git
synced 2025-07-27 15:45:21 +00:00
Remove excess hidden, premium key and redundant code
This commit is contained in:
parent
618485576d
commit
f446fcd50b
@ -31,7 +31,6 @@ public class ConfigController {
|
|||||||
private final EndpointConfiguration endpointConfiguration;
|
private final EndpointConfiguration endpointConfiguration;
|
||||||
|
|
||||||
@GetMapping("/app-config")
|
@GetMapping("/app-config")
|
||||||
@Hidden
|
|
||||||
public ResponseEntity<Map<String, Object>> getAppConfig() {
|
public ResponseEntity<Map<String, Object>> getAppConfig() {
|
||||||
Map<String, Object> configData = new HashMap<>();
|
Map<String, Object> configData = new HashMap<>();
|
||||||
|
|
||||||
@ -62,7 +61,6 @@ public class ConfigController {
|
|||||||
|
|
||||||
// Premium/Enterprise settings
|
// Premium/Enterprise settings
|
||||||
configData.put("premiumEnabled", applicationProperties.getPremium().isEnabled());
|
configData.put("premiumEnabled", applicationProperties.getPremium().isEnabled());
|
||||||
configData.put("premiumKey", applicationProperties.getPremium().getKey());
|
|
||||||
|
|
||||||
// Legal settings
|
// Legal settings
|
||||||
configData.put(
|
configData.put(
|
||||||
@ -107,20 +105,17 @@ public class ConfigController {
|
|||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
// Return basic config if there are any issues
|
// Return basic config if there are any issues
|
||||||
configData.put("error", "Unable to retrieve full configuration");
|
configData.put("error", "Unable to retrieve full configuration");
|
||||||
configData.put("appName", applicationProperties.getUi().getAppName());
|
|
||||||
return ResponseEntity.ok(configData);
|
return ResponseEntity.ok(configData);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/endpoint-enabled")
|
@GetMapping("/endpoint-enabled")
|
||||||
@Hidden
|
|
||||||
public ResponseEntity<Boolean> isEndpointEnabled(@RequestParam String endpoint) {
|
public ResponseEntity<Boolean> isEndpointEnabled(@RequestParam String endpoint) {
|
||||||
boolean enabled = endpointConfiguration.isEndpointEnabled(endpoint);
|
boolean enabled = endpointConfiguration.isEndpointEnabled(endpoint);
|
||||||
return ResponseEntity.ok(enabled);
|
return ResponseEntity.ok(enabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/endpoints-enabled")
|
@GetMapping("/endpoints-enabled")
|
||||||
@Hidden
|
|
||||||
public ResponseEntity<Map<String, Boolean>> areEndpointsEnabled(
|
public ResponseEntity<Map<String, Boolean>> areEndpointsEnabled(
|
||||||
@RequestParam String endpoints) {
|
@RequestParam String endpoints) {
|
||||||
Map<String, Boolean> result = new HashMap<>();
|
Map<String, Boolean> result = new HashMap<>();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user