package com.itdominator.api.controller;


import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;

import com.itdominator.api.dto.ScanQuery;
import com.itdominator.api.dto.User;

import lombok.extern.slf4j.Slf4j;




@Controller
@Slf4j
public class BaseController {

    @GetMapping({"/", "home"})
    public String index() {
        return "index";
    }

    @GetMapping("/register")
    public String register(Model model) {
        model.addAttribute("user", new User());

        return "register";
    }


    @GetMapping("/submit-for-scan")
    public String submitForScan(Model model) {
        model.addAttribute("scan_query", new ScanQuery());

        return "submit-for-scan";
    }
}
