Skip to content

Commit

Permalink
fix diesel template
Browse files Browse the repository at this point in the history
  • Loading branch information
chrislearn committed Jan 19, 2025
1 parent 2e55a91 commit cdf311a
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 2 deletions.
19 changes: 19 additions & 0 deletions locales/code_comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -474,6 +474,25 @@ listen_on:
th: ฟังที่
el: ακούστε στο
da: lyt på

lang:
en: en
zh_CN: zh-cn
zh_TW: zh-tw
fr: fr
ja: ja
es: es
de: de
ru: ru
it: it
pt: pt
ko: ko
no: no
is: is
uk: uk
th: th
el: el
da: da
salvo_cli_welcome:
en: Salvo-Cli Generated, Please Read README.md
zh_CN: 由Salvo-Cli生成,使用前请阅读README.md
Expand Down
2 changes: 1 addition & 1 deletion src/templates/classic/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ fn create_files(project_path: &Path, user_selected: Selected, new_cmd: &NewCmd)
"account":t!("account"),
"password":t!("password"),
"you_wont_be_able_to_revert_this":t!("you_wont_be_able_to_revert_this"),

"salvo_cli_welcome":t!("salvo_cli_welcome"),
"user_list":t!("user_list"),
"are_you_sure_you_want_to_delete":t!("are_you_sure_you_want_to_delete"),
Expand Down
3 changes: 2 additions & 1 deletion templates/classic/diesel/src/routers/auth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ use salvo::prelude::*;
use serde::{Deserialize, Serialize};

use crate::hoops::jwt;
use crate::models::User;
use crate::schema::*;
use crate::{db, json_ok, utils, AppResult, JsonResult};

Expand Down Expand Up @@ -64,7 +65,7 @@ pub async fn post_login(
.into());
}

let (token, exp) = jwt::get_token(&username, &id)?;
let (token, exp) = jwt::get_token(&id)?;
let odata = LoginOutData {
id,
username,
Expand Down

0 comments on commit cdf311a

Please sign in to comment.