diff --git a/.sqlx/query-d2990ce7f233d2489bb36a63920571c9f454a0605cc463829693d581bc0dce12.json b/.sqlx/query-d2990ce7f233d2489bb36a63920571c9f454a0605cc463829693d581bc0dce12.json
deleted file mode 100644
index dcf8493..0000000
--- a/.sqlx/query-d2990ce7f233d2489bb36a63920571c9f454a0605cc463829693d581bc0dce12.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "db_name": "PostgreSQL",
- "query": "DELETE FROM blobs WHERE cid = $1",
- "describe": {
- "columns": [],
- "parameters": {
- "Left": [
- "Text"
- ]
- },
- "nullable": []
- },
- "hash": "d2990ce7f233d2489bb36a63920571c9f454a0605cc463829693d581bc0dce12"
-}
diff --git a/crates/tranquil-api/src/admin/config.rs b/crates/tranquil-api/src/admin/config.rs
index 9004f15..05b87ea 100644
--- a/crates/tranquil-api/src/admin/config.rs
+++ b/crates/tranquil-api/src/admin/config.rs
@@ -1,10 +1,8 @@
use axum::{Json, extract::State};
use serde::{Deserialize, Serialize};
-use tracing::{error, warn};
use tranquil_pds::api::error::{ApiError, DbResultExt};
use tranquil_pds::auth::{Admin, Auth};
use tranquil_pds::state::AppState;
-use tranquil_types::CidLink;
#[derive(Serialize)]
#[serde(rename_all = "camelCase")]
@@ -183,46 +181,6 @@ pub async fn update_server_config(
}
if let Some(ref logo_cid) = req.logo_cid {
- let old_logo_cid = state
- .repos
- .infra
- .get_server_config("logo_cid")
- .await
- .ok()
- .flatten();
-
- let should_delete_old = match (&old_logo_cid, logo_cid.is_empty()) {
- (Some(old), true) => Some(old.clone()),
- (Some(old), false) if old != logo_cid => Some(old.clone()),
- _ => None,
- };
-
- if let Some(old_cid_str) = should_delete_old {
- match CidLink::new(old_cid_str) {
- Ok(old_cid) => {
- if let Ok(Some(storage_key)) = state
- .repos
- .infra
- .get_blob_storage_key_by_cid(&old_cid)
- .await
- {
- if let Err(e) = state.blob_store.delete(&storage_key).await {
- error!("Failed to delete old logo blob from storage: {:?}", e);
- }
- if let Err(e) = state.repos.infra.delete_blob_by_cid(&old_cid).await {
- error!("Failed to delete old logo blob record: {:?}", e);
- }
- }
- }
- Err(e) => {
- warn!(
- "Old logo CID in database is invalid, skipping cleanup: {:?}",
- e
- );
- }
- }
- }
-
if logo_cid.is_empty() {
state
.repos
diff --git a/crates/tranquil-db-traits/src/infra.rs b/crates/tranquil-db-traits/src/infra.rs
index f6c5b15..5407fd3 100644
--- a/crates/tranquil-db-traits/src/infra.rs
+++ b/crates/tranquil-db-traits/src/infra.rs
@@ -1,7 +1,7 @@
use async_trait::async_trait;
use chrono::{DateTime, Utc};
use serde::{Deserialize, Serialize};
-use tranquil_types::{CidLink, Did, Handle, InviteCode};
+use tranquil_types::{Did, Handle, InviteCode};
use uuid::Uuid;
use crate::DbError;
@@ -417,10 +417,6 @@ pub trait InfraRepository: Send + Sync {
async fn delete_server_config(&self, key: &str) -> Result<(), DbError>;
- async fn get_blob_storage_key_by_cid(&self, cid: &CidLink) -> Result