package rs.ac.uns.acs.nais.GreetingApplication.controller;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import rs.ac.uns.acs.nais.GreetingApplication.service.UserService;

@RestController()
@RequestMapping("/users")
public class UserController {

    @Autowired
    private UserService userService;

    @GetMapping("/greet/{userId}")
    public String greetUser(@PathVariable Long userId) {
        return userService.greetUser(userId);
    }
}
