From 308ecec34122c1b9030209a4428246ca05ec8f77 Mon Sep 17 00:00:00 2001 From: naskya Date: Thu, 6 Jun 2024 17:10:40 +0900 Subject: [PATCH] chore: format --- packages/backend-rs/src/database/mod.rs | 2 +- packages/backend-rs/src/database/redis.rs | 4 ++-- packages/backend/src/server/api/endpoints/antennas/create.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/backend-rs/src/database/mod.rs b/packages/backend-rs/src/database/mod.rs index e41b89f737..03315c1080 100644 --- a/packages/backend-rs/src/database/mod.rs +++ b/packages/backend-rs/src/database/mod.rs @@ -2,8 +2,8 @@ pub use postgresql::get_conn as db_conn; -pub use redis::key as redis_key; pub use redis::get_conn as redis_conn; +pub use redis::key as redis_key; pub use redis::RedisConnError; pub mod cache; diff --git a/packages/backend-rs/src/database/redis.rs b/packages/backend-rs/src/database/redis.rs index fd44e28afe..266e563c8d 100644 --- a/packages/backend-rs/src/database/redis.rs +++ b/packages/backend-rs/src/database/redis.rs @@ -88,8 +88,8 @@ pub enum RedisConnError { } /// Returns an async [redis] connection managed by a [bb8] connection pool. -pub async fn get_conn( -) -> Result, RedisConnError> { +pub async fn get_conn() -> Result, RedisConnError> +{ if !CONN_POOL.initialized() { let init_res = init_conn_pool().await; diff --git a/packages/backend/src/server/api/endpoints/antennas/create.ts b/packages/backend/src/server/api/endpoints/antennas/create.ts index dc16f9290f..69dd19b0cb 100644 --- a/packages/backend/src/server/api/endpoints/antennas/create.ts +++ b/packages/backend/src/server/api/endpoints/antennas/create.ts @@ -171,7 +171,7 @@ export default define(meta, paramDef, async (ps, user) => { withFile: ps.withFile, notify: ps.notify, }).then((x) => Antennas.findOneByOrFail(x.identifiers[0])); - + publishInternalEvent("antennaCreated", antenna); await updateAntennaCache();