You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
798 B
30 lines
798 B
package org.ros.chatto.controller;
|
|
|
|
import org.ros.chatto.service.UserService;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.stereotype.Controller;
|
|
import org.springframework.ui.Model;
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
|
@Controller
|
|
@RequestMapping("/admin")
|
|
@RequiredArgsConstructor
|
|
public class AdminController {
|
|
|
|
@Autowired
|
|
private final UserService userService;
|
|
|
|
@GetMapping()
|
|
public String home() {
|
|
return "admin/home";
|
|
}
|
|
|
|
@GetMapping("/change-passphrase")
|
|
public String changePassphrase(Model model) {
|
|
model.addAttribute("userNames", userService.getAllRegularUsers());
|
|
return "admin/change-passphrase";
|
|
}
|
|
}
|