31 lines
903 B
Java
31 lines
903 B
Java
package com.myoa.engineering.crawl.ppomppu.processor.controller;
|
|
|
|
import org.springframework.web.bind.annotation.PathVariable;
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
import com.myoa.engineering.crawl.ppomppu.support.dto.code.PpomppuBoardName;
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import reactor.core.publisher.Mono;
|
|
|
|
/**
|
|
* CrawlAPIController
|
|
* @author Shin Woo-jin (woo-jin.shin@linecorp.com)
|
|
* @since 2021-09-05
|
|
*
|
|
*/
|
|
@Slf4j
|
|
@RestController
|
|
@RequestMapping("/api/v1/crawl")
|
|
public class CrawlAPIController {
|
|
|
|
@PostMapping("/boards/{boardName}")
|
|
public Mono<String> crawlBoard(@PathVariable("boardName") PpomppuBoardName boardName) {
|
|
log.info("got request... {}", boardName);
|
|
return Mono.just(boardName.getBoardPath());
|
|
}
|
|
|
|
}
|