0

I'm trying to get a handle on the Spring Web Flux. I was able to get the @getmapping to give me back my json parameters. And in the cassandra database I was able to delete a row using that command in the repository, but I can't delete a row from the commandline. What would you guys recommend?

//This code is in my controller 
//It's supposed to call method when I type in my terminal "curl localhost:8080/orders/delete/1"
   @DeleteMapping("/delete/{id}")
    public Mono<Integer> deleteOrder(@PathVariable("id") int id){

//This code is in my service called after the top portion
    public Mono<Integer> deleteOrder(int id) {return orderRepository.deleteOrder(id);} {
//And then in my repository this should be the last called method 
public Mono<Integer> deleteOrder(int uuid) {
      //  log.info("Attempting to delete");
        Flux.from(
                session.executeReactive(
                        SimpleStatement.builder("DELETE FROM LightNfresh.orders WHERE order_id = ?")
                            .addPositionalValue(uuid)
                            .build()))
                .subscribe();
        return Mono.just(uuid);
    }
Terry Light
  • 109
  • 1
  • 7

1 Answers1

0

Turns out it was just my curl command. It should've been curl -X "DELETE" localhost:8080/orders/delete/1 Thanks to anyone that was looking into it.

Terry Light
  • 109
  • 1
  • 7