blob: 8e5ef6fb2a19b850c54a8cb84600815447b237ee [file] [log] [blame]
package org.apache.camel.example.springboot.numbers.mainrouter.web;
import org.apache.camel.example.springboot.numbers.mainrouter.service.SubscribersService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;
import reactor.core.publisher.Mono;
@RestController
public class SubscribersController {
private final SubscribersService subscribersService;
public SubscribersController(SubscribersService subscribersService) {
this.subscribersService = subscribersService;
}
@GetMapping(path = "/list/{channel}")
public Mono<String> listSubscriptions(@PathVariable("channel") String channel) {
return Mono.just(subscribersService.listSubscriptions(channel));
}
}