From 0e4ce21c589751fbcc5ec869b4e7f54070570a9f Mon Sep 17 00:00:00 2001 From: akastijn Date: Sat, 7 Feb 2026 23:39:41 +0100 Subject: [PATCH] Remove unused notification methods in `ParticleController` and adjust size slider minimum value in particle component. --- .../particles/ParticleController.java | 34 ++----------------- .../particle/particle.component.html | 2 +- 2 files changed, 3 insertions(+), 33 deletions(-) diff --git a/backend/src/main/java/com/alttd/altitudeweb/controllers/particles/ParticleController.java b/backend/src/main/java/com/alttd/altitudeweb/controllers/particles/ParticleController.java index 8d481e8..ea1280c 100644 --- a/backend/src/main/java/com/alttd/altitudeweb/controllers/particles/ParticleController.java +++ b/backend/src/main/java/com/alttd/altitudeweb/controllers/particles/ParticleController.java @@ -95,9 +95,7 @@ public class ParticleController implements ParticlesApi { log.error("Particles file path {} is not a directory, not saving particles file", particlesFilePath); return ResponseEntity.status(404).build(); } - ResponseEntity voidResponseEntity = writeContentToFile(file, filename, content); -// notifyServerOfFileUpload(filename); - return voidResponseEntity; + return writeContentToFile(file, filename, content); } @Override @@ -115,37 +113,9 @@ public class ParticleController implements ParticlesApi { } } - ResponseEntity voidResponseEntity = writeContentToFile(file, filename, content); -// notifyServerOfFileUpload(uuid, filename); - return voidResponseEntity; + return writeContentToFile(file, filename, content); } -// private void notifyServerOfFileUpload(String filename) { -// String notificationUrl = String.format("http://%s/notify/%s.json", notificationServerUrl, filename); -// sendNotification(notificationUrl, String.format("file upload: %s", filename)); -// } -// -// private void notifyServerOfFileUpload(String uuid, String filename) { -// String notificationUrl = String.format("%s/notify/%s/%s.json", notificationServerUrl, uuid, filename); -// sendNotification(notificationUrl, String.format("file upload for user %s: %s", uuid, filename)); -// } -// -// private void sendNotification(String notificationUrl, String logDescription) { -// try { -// RestTemplate restTemplate = new RestTemplate(); -// ResponseEntity response = restTemplate.getForEntity(notificationUrl, String.class); -// -// if (response.getStatusCode().is2xxSuccessful()) { -// log.info("Successfully notified server of {}", logDescription); -// } else { -// log.warn("Failed to notify server of {}, status: {}", -// logDescription, response.getStatusCode()); -// } -// } catch (Exception e) { -// log.error("Error notifying server of {}", logDescription, e); -// } -// } - private ResponseEntity writeContentToFile(File dir, String filename, MultipartFile content) { filename += ".json"; diff --git a/frontend/src/app/pages/particles/components/particle/particle.component.html b/frontend/src/app/pages/particles/components/particle/particle.component.html index ba00630..32ca199 100644 --- a/frontend/src/app/pages/particles/components/particle/particle.component.html +++ b/frontend/src/app/pages/particles/components/particle/particle.component.html @@ -28,7 +28,7 @@
- + Size: {{ selectedSize }}