package de.htwsaar.webshop.controller;

import jakarta.servlet.http.HttpServletRequest;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import static de.htwsaar.webshop.config.ControllerPathConfig.HEALTH;
import static de.htwsaar.webshop.util.LoggerUtil.logRequest;

@RestController
@Slf4j
public class HealthController {

    @RequestMapping(value = HEALTH, method = RequestMethod.GET)
    String getHealth(HttpServletRequest request) {
        logRequest(request);
        return "OK";
    }
}
