Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1820a39fef
|
||
|
|
c7c63f98b4
|
@@ -1,4 +1,4 @@
|
|||||||
name: textsender_models PR
|
name: schedtxt_models PR
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
|
|||||||
Generated
+15
-15
@@ -1067,6 +1067,21 @@ dependencies = [
|
|||||||
"windows-sys",
|
"windows-sys",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "schedtxt_models"
|
||||||
|
version = "0.5.2"
|
||||||
|
dependencies = [
|
||||||
|
"const_format",
|
||||||
|
"dotenvy",
|
||||||
|
"josekit",
|
||||||
|
"serde",
|
||||||
|
"serde_json",
|
||||||
|
"sqlx",
|
||||||
|
"time",
|
||||||
|
"utoipa",
|
||||||
|
"uuid",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "scopeguard"
|
name = "scopeguard"
|
||||||
version = "1.2.0"
|
version = "1.2.0"
|
||||||
@@ -1451,21 +1466,6 @@ dependencies = [
|
|||||||
"windows-sys",
|
"windows-sys",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "textsender_models"
|
|
||||||
version = "0.5.2"
|
|
||||||
dependencies = [
|
|
||||||
"const_format",
|
|
||||||
"dotenvy",
|
|
||||||
"josekit",
|
|
||||||
"serde",
|
|
||||||
"serde_json",
|
|
||||||
"sqlx",
|
|
||||||
"time",
|
|
||||||
"utoipa",
|
|
||||||
"uuid",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "thiserror"
|
name = "thiserror"
|
||||||
version = "2.0.18"
|
version = "2.0.18"
|
||||||
|
|||||||
+2
-2
@@ -1,9 +1,9 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "textsender_models"
|
name = "schedtxt_models"
|
||||||
version = "0.5.2"
|
version = "0.5.2"
|
||||||
edition = "2024"
|
edition = "2024"
|
||||||
rust-version = "1.97"
|
rust-version = "1.97"
|
||||||
description = "Models used for the textsender project"
|
description = "Models used for the schedtxt project"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
serde = { version = "1.0.228", features = ["derive"] }
|
serde = { version = "1.0.228", features = ["derive"] }
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ pub fn get_root_directory() -> crate::envy::EnvVar {
|
|||||||
|
|
||||||
pub fn get_app_base_api_url() -> crate::envy::EnvVar {
|
pub fn get_app_base_api_url() -> crate::envy::EnvVar {
|
||||||
dotenvy::dotenv().ok();
|
dotenvy::dotenv().ok();
|
||||||
let key = crate::envy::keys::TEXTSENDER_BASE_API_URL;
|
let key = crate::envy::keys::SCHEDTXT_BASE_API_URL;
|
||||||
let value = std::env::var(key).expect(key);
|
let value = std::env::var(key).expect(key);
|
||||||
|
|
||||||
crate::envy::init_envvar(key, &value)
|
crate::envy::init_envvar(key, &value)
|
||||||
@@ -48,7 +48,7 @@ pub fn get_app_base_api_url() -> crate::envy::EnvVar {
|
|||||||
|
|
||||||
pub fn get_app_auth_base_api_url() -> crate::envy::EnvVar {
|
pub fn get_app_auth_base_api_url() -> crate::envy::EnvVar {
|
||||||
dotenvy::dotenv().ok();
|
dotenvy::dotenv().ok();
|
||||||
let key = crate::envy::keys::TEXTSENDER_AUTH_BASE_API_URL;
|
let key = crate::envy::keys::SCHEDTXT_AUTH_BASE_API_URL;
|
||||||
let value = std::env::var(key).expect(key);
|
let value = std::env::var(key).expect(key);
|
||||||
|
|
||||||
crate::envy::init_envvar(key, &value)
|
crate::envy::init_envvar(key, &value)
|
||||||
|
|||||||
+8
-8
@@ -2,7 +2,7 @@
|
|||||||
pub const DB_URL: &str = "DATABASE_URL";
|
pub const DB_URL: &str = "DATABASE_URL";
|
||||||
|
|
||||||
/// Environment key for secret main key
|
/// Environment key for secret main key
|
||||||
/// Used for the textsender app
|
/// Used for the schedtxt app
|
||||||
pub const SECRET_MAIN_KEY: &str = "SECRET_MAIN_KEY";
|
pub const SECRET_MAIN_KEY: &str = "SECRET_MAIN_KEY";
|
||||||
|
|
||||||
/// Environment key for service logins
|
/// Environment key for service logins
|
||||||
@@ -15,11 +15,11 @@ pub const SECRET_KEY: &str = "SECRET_KEY";
|
|||||||
/// Environment key for root directory for the textsender app
|
/// Environment key for root directory for the textsender app
|
||||||
pub const ROOT_DIRECTORY: &str = "ROOT_DIRECTORY";
|
pub const ROOT_DIRECTORY: &str = "ROOT_DIRECTORY";
|
||||||
|
|
||||||
/// Environment key for textsender api url
|
/// Environment key for schedtxt api url
|
||||||
pub const TEXTSENDER_BASE_API_URL: &str = "TEXTSENDER_BASE_API_URL";
|
pub const SCHEDTXT_BASE_API_URL: &str = "SCHEDTXT_BASE_API_URL";
|
||||||
|
|
||||||
/// Environment key for textsender auth api url
|
/// Environment key for textsender auth api url
|
||||||
pub const TEXTSENDER_AUTH_BASE_API_URL: &str = "TEXTSENDER_AUTH_BASE_API_URL";
|
pub const SCHEDTXT_AUTH_BASE_API_URL: &str = "SCHEDTXT_AUTH_BASE_API_URL";
|
||||||
|
|
||||||
/// Environment key for App status
|
/// Environment key for App status
|
||||||
pub const APP_ENV: &str = "APP_ENV";
|
pub const APP_ENV: &str = "APP_ENV";
|
||||||
@@ -41,10 +41,10 @@ pub mod error {
|
|||||||
pub const SERVICE_LOGIN: &str = concatcp!(super::SERVICE_PASSPHRASE, " ", GENERAL_ERROR);
|
pub const SERVICE_LOGIN: &str = concatcp!(super::SERVICE_PASSPHRASE, " ", GENERAL_ERROR);
|
||||||
pub const SECRET_KEY: &str = concatcp!(super::SECRET_KEY, " ", GENERAL_ERROR);
|
pub const SECRET_KEY: &str = concatcp!(super::SECRET_KEY, " ", GENERAL_ERROR);
|
||||||
pub const ROOT_DIRECTORY: &str = concatcp!(super::ROOT_DIRECTORY, " ", GENERAL_ERROR);
|
pub const ROOT_DIRECTORY: &str = concatcp!(super::ROOT_DIRECTORY, " ", GENERAL_ERROR);
|
||||||
pub const TEXTSENDER_BASE_API_URL: &str =
|
pub const SCHEDTXT_BASE_API_URL: &str =
|
||||||
concatcp!(super::TEXTSENDER_BASE_API_URL, " ", GENERAL_ERROR);
|
concatcp!(super::SCHEDTXT_BASE_API_URL, " ", GENERAL_ERROR);
|
||||||
pub const TEXTSENDER_AUTH_BASE_API_URL: &str =
|
pub const SCHEDTXT_AUTH_BASE_API_URL: &str =
|
||||||
concatcp!(super::TEXTSENDER_AUTH_BASE_API_URL, " ", GENERAL_ERROR);
|
concatcp!(super::SCHEDTXT_AUTH_BASE_API_URL, " ", GENERAL_ERROR);
|
||||||
pub const APP_ENV: &str = concatcp!(super::APP_ENV, " ", GENERAL_ERROR);
|
pub const APP_ENV: &str = concatcp!(super::APP_ENV, " ", GENERAL_ERROR);
|
||||||
pub const BACKEND_PORT: &str = concatcp!(super::BACKEND_PORT, " ", GENERAL_ERROR);
|
pub const BACKEND_PORT: &str = concatcp!(super::BACKEND_PORT, " ", GENERAL_ERROR);
|
||||||
pub const FRONTEND_URL: &str = concatcp!(super::FRONTEND_URL, " ", GENERAL_ERROR);
|
pub const FRONTEND_URL: &str = concatcp!(super::FRONTEND_URL, " ", GENERAL_ERROR);
|
||||||
|
|||||||
+2
-2
@@ -174,8 +174,8 @@ fn init_payload_issued(
|
|||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
const TEST_MESSAGE: &str = "Testing for textsender";
|
const TEST_MESSAGE: &str = "Testing for schedtxt";
|
||||||
const TEST_ISSUER: &str = "textsender-test";
|
const TEST_ISSUER: &str = "schedtxt-test";
|
||||||
const TEST_AUDIENCE: &str = "area-test";
|
const TEST_AUDIENCE: &str = "area-test";
|
||||||
const TEST_USER_ID: uuid::Uuid = uuid::uuid!("9ab1c75f-d184-4913-ae99-544b4dcfcb41");
|
const TEST_USER_ID: uuid::Uuid = uuid::uuid!("9ab1c75f-d184-4913-ae99-544b4dcfcb41");
|
||||||
const TEST_KEY: &str = "8342nhf7ycrt4983q7ryfc93w478ryfc3w9487ryfc342w98i7cy";
|
const TEST_KEY: &str = "8342nhf7ycrt4983q7ryfc93w478ryfc3w9487ryfc342w98i7cy";
|
||||||
|
|||||||
Reference in New Issue
Block a user