package com.kamco.cd.kamcoback.common.api;

import com.kamco.cd.kamcoback.common.api.HelloDto.Res;
import com.kamco.cd.kamcoback.common.service.HelloService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequiredArgsConstructor
@RestController
@RequestMapping("/api/hello")
public class HelloApiController {

  private final HelloService helloService;

  @GetMapping
  public HelloDto.Res hello(HelloDto.Req req) {
    req.valid();

    Res res = helloService.sayHello(req);

    return res;
  }
}
