use actix_web::{web, HttpResponse, Responder};
use rinja::Template;

use crate::{models::User, utils::ApplicationError};

#[derive(Template)]
#[template(path = "user/profile_change_password.html")]
struct ProfileChangePasswordTemplate {}

#[actix_web::get("/users/changepassword")]
pub async fn get(_user: web::ReqData<User>) -> Result<impl Responder, ApplicationError> {
    let template = ProfileChangePasswordTemplate {};

    Ok(HttpResponse::Ok().body(template.render()?))
}
