feature/authentication service #9

Merged
GW_MC merged 19 commits from feature/authentication into master 2025-12-19 12:24:49 +08:00
3 changed files with 15 additions and 0 deletions
Showing only changes of commit 30e500ec44 - Show all commits

1
apps/api/src/helpers.rs Normal file
View File

@@ -0,0 +1 @@
pub mod database;

View File

@@ -0,0 +1,13 @@
#[macro_export]
macro_rules! with_conn {
// Usage: with_conn!(connection, tx_option, ident, |conn|-> { ... })
($conn:expr, $tx:expr, $ident:ident, $body:block) => {{
if let Some(t) = $tx {
let $ident = t;
$body
} else {
let $ident = $conn;
$body
}
}};
}

View File

@@ -1,6 +1,7 @@
mod cmd; mod cmd;
mod configs; mod configs;
mod errors; mod errors;
mod helpers;
mod log; mod log;
mod middlewares; mod middlewares;
mod routes; mod routes;