fixed emailController

This commit is contained in:
2025-12-12 08:06:04 -05:00
parent f8ff380fa8
commit f35a45e74e
2 changed files with 5 additions and 2 deletions

View File

@@ -98,9 +98,9 @@ public class EmailController {
} }
@DeleteMapping("/delete/{id}") @DeleteMapping("/delete/{id}")
public ResponseEntity<Void> deleteItem(@PathVariable Integer id) { public ResponseEntity<Void> deleteItem(@PathVariable Integer id) {
return brandService.findById(id) return emailRequestRepository.findById(Long.valueOf(id))
.map(item -> { .map(item -> {
brandService.deleteById(id); emailRequestRepository.deleteById(Long.valueOf(id));
return ResponseEntity.noContent().<Void>build(); return ResponseEntity.noContent().<Void>build();
}) })
.orElse(ResponseEntity.notFound().build()); .orElse(ResponseEntity.notFound().build());

View File

@@ -1,9 +1,12 @@
package group.goforward.battlbuilder.services.utils; package group.goforward.battlbuilder.services.utils;
import aj.org.objectweb.asm.commons.Remapper;
import group.goforward.battlbuilder.model.EmailRequest; import group.goforward.battlbuilder.model.EmailRequest;
public interface EmailService { public interface EmailService {
EmailRequest sendEmail(String recipient, String subject, String body); EmailRequest sendEmail(String recipient, String subject, String body);
void deleteById(Integer id); void deleteById(Integer id);
} }