From 37b2b9d9ce00161c982fa7ed218dc599f0ebe471 Mon Sep 17 00:00:00 2001 From: franklinblanco Date: Fri, 8 Jul 2022 09:30:26 -0400 Subject: [PATCH] added setup sh file --- Cargo.toml | 4 ++-- release-setup.sh | 2 ++ src/dao/token_dao.rs | 1 - 3 files changed, 4 insertions(+), 3 deletions(-) create mode 100644 release-setup.sh diff --git a/Cargo.toml b/Cargo.toml index 5cc5887..855d1af 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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" diff --git a/release-setup.sh b/release-setup.sh new file mode 100644 index 0000000..48681e6 --- /dev/null +++ b/release-setup.sh @@ -0,0 +1,2 @@ +cargo build --release +cp target/release/user-svc-actix-backend . \ No newline at end of file diff --git a/src/dao/token_dao.rs b/src/dao/token_dao.rs index ae97821..d260a2f 100644 --- a/src/dao/token_dao.rs +++ b/src/dao/token_dao.rs @@ -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 { sqlx::query_file!("sql/schema/token/insert.sql", token.user_id, token.auth_token, token.refresh_token).execute(conn).await }