rename gjp2 to gjp

This commit is contained in:
Reid 2023-08-31 01:09:52 -07:00
parent fc9c120076
commit 45a2cca6f6
Signed by: reidlab
GPG key ID: 6C9EAA3364F962C8
4 changed files with 4 additions and 3 deletions

View file

@ -30,6 +30,7 @@ pub fn login_account(input: Form<FromLoginAccount>) -> status::Custom<&'static s
return status::Custom(Status::Ok, "-9")
}
// account verification
{
use crate::schema::accounts::dsl::*;
@ -42,7 +43,7 @@ pub fn login_account(input: Form<FromLoginAccount>) -> status::Custom<&'static s
Ok(account_id_gjp2) => {
let user_id = helpers::accounts::get_user_id_from_account_id(account_id_gjp2.0);
match verify_password(helpers::gjp2::get_gjp2(input.password.clone()).as_bytes(), account_id_gjp2.1.as_str()) {
match verify_password(helpers::gjp::get_gjp2(input.password.clone()).as_bytes(), account_id_gjp2.1.as_str()) {
Ok(_) => return status::Custom(Status::Ok,
Box::leak(format!("{},{}", account_id_gjp2.0, user_id).into_boxed_str())
),

View file

@ -60,7 +60,7 @@ pub fn register_account(input: Form<FormRegisterAccount>) -> status::Custom<&'st
let new_account = NewAccount {
username: input.userName.clone(),
gjp2: helpers::gjp2::get_gjp2_hashed(input.password.clone()),
gjp2: helpers::gjp::get_gjp2_hashed(input.password.clone()),
email: input.email.clone()
};
inserted_account = diesel::insert_into(accounts)