added setup sh file

This commit is contained in:
franklinblanco 2022-07-08 09:30:26 -04:00
parent 589c206e9f
commit 37b2b9d9ce
3 changed files with 4 additions and 3 deletions

View File

@ -1,5 +1,5 @@
[package]
name = "corpos-backend"
name = "user-svc-actix-backend"
version = "0.1.0"
edition = "2021"
@ -9,7 +9,7 @@ edition = "2021"
dotenv = "0.15.0"
serde = { version = "1.0", features = ["derive"] }
tokio = { version = "1", features = ["full"] }
sqlx = { version = "0.5", features = [ "runtime-tokio-rustls", "mysql", "chrono" ] }
sqlx = { version = "0.6.0", features = [ "runtime-tokio-rustls", "mysql", "chrono" ] }
actix-web = "4"
chrono = { version = "0.4", features = [ "serde" ] }
ring = "0.16.20"

2
release-setup.sh Normal file
View File

@ -0,0 +1,2 @@
cargo build --release
cp target/release/user-svc-actix-backend .

View File

@ -3,7 +3,6 @@ use sqlx::{MySqlConnection, mysql::MySqlQueryResult};
use crate::r#do::token::Token;
use crate::r#do::token::{AUTH_TOKEN_EXPIRATION_TIME_IN_DAYS, REFRESH_TOKEN_EXPIRATION_TIME_IN_DAYS};
pub async fn insert_token(conn: &mut MySqlConnection, token: &Token) -> Result<MySqlQueryResult, sqlx::Error> {
sqlx::query_file!("sql/schema/token/insert.sql", token.user_id, token.auth_token, token.refresh_token).execute(conn).await
}