Commit 746c5bd5 authored by Darrick Yong's avatar Darrick Yong

add delete all route

parent 6d230f5d
......@@ -44,4 +44,11 @@ public class WarehouseController {
return orderService.deleteOrder(id);
}
@CrossOrigin
@DeleteMapping(value = "/orders/all")
public Mono<Void> deleteAllOrders() {
System.out.println("Deleted all orders");
return orderService.deleteAllOrders();
}
}
......@@ -47,5 +47,9 @@ public class WarehouseOrderService {
return orderRepository.deleteById(id);
}
public Mono<Void> deleteAllOrders() {
return orderRepository.deleteAll();
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment