package com.codenetworkz.blog.web.controllers.dashboard;

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

@Controller
@RequestMapping("admin")
public class DashboardViewController {

    @GetMapping("dashboard")
    public String dashboardViewPage(Model model) {
        model.addAttribute("pageTitle", "Dashboard");
        return "admin/dashboard/home";
    }

    @GetMapping("profile")
    public String profileViewPage(Model model) {
        model.addAttribute("pageTitle", "Profile");
        return "admin/dashboard/profile";
    }

    @GetMapping("change-password")
    public String changepasswordViewPage(Model model) {
        model.addAttribute("pageTitle", "Change Password");
        return "admin/dashboard/forgotPassword";
    }

    @GetMapping("change-username")
    public String changeUsernameViewPage(Model model) {
        model.addAttribute("pageTitle", "Change Username");
        return "admin/dashboard/changeusername";
    }
}
