diff --git a/crates/im-core/src/services.rs b/crates/im-core/src/services.rs index ac3962e..c810d06 100644 --- a/crates/im-core/src/services.rs +++ b/crates/im-core/src/services.rs @@ -26,7 +26,7 @@ pub struct Service { /// The app that keeps this row — `SELF_OWNER` for im's own entry, a /// client id for a sibling that registered itself, `None` for a row the /// seed or the panel made. Never serialized: `/family`'s shape is the - /// three public fields the siblings mirror, and nothing more. + /// public fields below, and the ownership stays im's business. #[serde(skip)] pub owner: Option, /// The relying-party credential this row answers for — the client id @@ -37,6 +37,13 @@ pub struct Service { /// carries `None` until its app registers. #[serde(skip)] pub client_id: Option, + /// The storage cap the panel holds this service to, in bytes — im's + /// field alone, never the keeping app's. Served to the family as + /// `limit_bytes` (JSON `null` when unstated, the sibling's own default + /// standing in its place); a register's refresh never touches it, the + /// way it never touches the name. + #[serde(rename = "limit_bytes")] + pub storage_limit_bytes: Option, } /// The owner im writes on its own row, registered from `issuer` on every @@ -92,7 +99,8 @@ pub async fn list(store: &Store) -> Result> { let conn = store.conn.lock().await; let mut rows = conn .query( - "SELECT key, name, url, owner, client_id FROM services ORDER BY position, key", + "SELECT key, name, url, owner, client_id, storage_limit_bytes \ + FROM services ORDER BY position, key", (), ) .await @@ -105,6 +113,7 @@ pub async fn list(store: &Store) -> Result> { url: store::text(&row, 2)?, owner: store::opt_text(&row, 3)?, client_id: store::opt_text(&row, 4)?, + storage_limit_bytes: store::opt_int(&row, 5)?.map(|bytes| bytes.max(0) as u64), }); } Ok(services) @@ -132,22 +141,34 @@ pub async fn add(store: &Store, service: &Service) -> Result<()> { ))); } conn.execute( - "INSERT INTO services (key, name, url, position) \ - VALUES (?1, ?2, ?3, (SELECT COALESCE(MAX(position), -1) + 1 FROM services))", - turso::params![service.key.as_str(), service.name.trim(), url.as_str()], + "INSERT INTO services (key, name, url, position, storage_limit_bytes) \ + VALUES (?1, ?2, ?3, (SELECT COALESCE(MAX(position), -1) + 1 FROM services), ?4)", + turso::params![ + service.key.as_str(), + service.name.trim(), + url.as_str(), + service.storage_limit_bytes.map(|bytes| bytes as i64) + ], ) .await .map_err(backend)?; Ok(()) } -/// Rewrites a service's name and address. The key travels in the form's -/// hidden field and is not editable; a key not on the list is refused, so a -/// form posted against a since-removed row cannot resurrect it. -/// A row an app keeps only takes its new name here: the address is the +/// Rewrites a service's name, address, and storage limit. The key travels +/// in the form's hidden field and is not editable; a key not on the list is +/// refused, so a form posted against a since-removed row cannot resurrect +/// it. A row an app keeps only takes its new name here: the address is the /// app's own, rewritten on its every boot, so accepting one from the panel -/// would show an edit the next boot silently undoes. -pub async fn edit(store: &Store, key: &str, name: &str, url: &str) -> Result<()> { +/// would show an edit the next boot silently undoes. The limit is im's on +/// every row — kept or not, an empty field clears it to no limit stated. +pub async fn edit( + store: &Store, + key: &str, + name: &str, + url: &str, + storage_limit_bytes: Option, +) -> Result<()> { validate(key, name, url).map_err(StoreError::Invalid)?; let url = url.trim_end_matches('/'); if let Some(row) = owned_row(store, key).await? @@ -161,11 +182,16 @@ pub async fn edit(store: &Store, key: &str, name: &str, url: &str) -> Result<()> let conn = store.conn.lock().await; let updated = conn .execute( - "UPDATE services SET name = ?2, url = ?3 WHERE key = ?1", - turso::params![key, name.trim(), url], + "UPDATE services SET name = ?2, url = ?3, storage_limit_bytes = ?4 WHERE key = ?1", + turso::params![ + key, + name.trim(), + url, + storage_limit_bytes.map(|bytes| bytes as i64) + ], ) - .await - .map_err(backend)?; + .await + .map_err(backend)?; if updated == 0 { return Err(StoreError::Invalid(format!("no service keyed {key:?}"))); } @@ -376,6 +402,7 @@ mod tests { url: url.to_string(), owner: None, client_id: None, + storage_limit_bytes: None, } } @@ -401,7 +428,7 @@ mod tests { assert_eq!(list(&store).await.unwrap()[0].url, "http://127.0.0.1:7655"); // The panel renamed the first entry; a re-boot with the same config // must not bring the old name back. - edit(&store, "in", "Renamed", "http://127.0.0.1:7655") + edit(&store, "in", "Renamed", "http://127.0.0.1:7655", None) .await .unwrap(); assert!(!seed_from(&store, &seed).await.unwrap()); @@ -423,7 +450,7 @@ mod tests { .unwrap_or_else(|| panic!("a taken key must be refused")); // The refused add changed nothing. assert_eq!(keys(&store).await, vec!["im".to_string(), "in".to_string()]); - edit(&store, "in", "Dosyalar", "https://in.example") + edit(&store, "in", "Dosyalar", "https://in.example", None) .await .unwrap(); let services = list(&store).await.unwrap(); @@ -432,7 +459,7 @@ mod tests { // A form posted against a since-removed key cannot resurrect it. remove(&store, "in").await.unwrap(); assert!(matches!( - edit(&store, "in", "Zombie", "https://in.example").await, + edit(&store, "in", "Zombie", "https://in.example", None).await, Err(StoreError::Invalid(_)) )); assert_eq!(keys(&store).await, vec!["im".to_string()]); @@ -598,11 +625,11 @@ mod tests { Err(StoreError::Invalid(_)) )); assert!(matches!( - edit(&store, "in", "Dosyalar", "https://elsewhere.example").await, + edit(&store, "in", "Dosyalar", "https://elsewhere.example", None).await, Err(StoreError::Invalid(_)) )); // The name is still the admin's, and a name-only edit lands. - edit(&store, "in", "Dosyalar", "https://in.example") + edit(&store, "in", "Dosyalar", "https://in.example", None) .await .unwrap(); let row = &list(&store).await.unwrap()[0]; @@ -617,17 +644,95 @@ mod tests { } #[tokio::test] - async fn the_family_json_never_carries_the_owner() { + async fn the_family_json_carries_the_limit_and_never_the_owner() { let store = store().await; register(&store, "im", "Account", "http://127.0.0.1:7650", SELF_OWNER, None) .await .unwrap(); let json = serde_json::to_value(list(&store).await.unwrap()).unwrap(); let row = &json.as_array().unwrap()[0]; + let mut keys: Vec = row.as_object().unwrap().keys().cloned().collect(); + keys.sort(); assert_eq!( - row.as_object().unwrap().keys().collect::>(), - vec!["key", "name", "url"], + keys, + vec!["key", "limit_bytes", "name", "url"], "the sibling mirrors deserialize this shape: {json}" ); + assert!( + row["limit_bytes"].is_null(), + "no stated limit reads null, not absence" + ); + // A stated limit rides as plain bytes; the owner never travels. + edit( + &store, + "im", + "Account", + "http://127.0.0.1:7650", + Some(512 * 1024 * 1024), + ) + .await + .unwrap(); + let json = serde_json::to_value(list(&store).await.unwrap()).unwrap(); + assert_eq!( + json[0]["limit_bytes"], + serde_json::json!(512 * 1024 * 1024) + ); + assert!(json[0].get("owner").is_none()); + assert!(json[0].get("client_id").is_none()); + } + + #[tokio::test] + async fn the_storage_limit_round_trips_and_survives_a_register() { + let store = store().await; + add( + &store, + &Service { + storage_limit_bytes: Some(512 * 1024 * 1024), + ..service("in", "Files", "http://127.0.0.1:7655") + }, + ) + .await + .unwrap(); + assert_eq!( + list(&store).await.unwrap()[0].storage_limit_bytes, + Some(512 * 1024 * 1024), + "add carries the stated limit in" + ); + // The edit rewrites the limit; the row holds plain bytes. + edit( + &store, + "in", + "Files", + "http://127.0.0.1:7655", + Some(2 * 1024 * 1024 * 1024), + ) + .await + .unwrap(); + assert_eq!( + list(&store).await.unwrap()[0].storage_limit_bytes, + Some(2 * 1024 * 1024 * 1024) + ); + // A kept row: the app re-registers, the limit stays im's — the + // refresh rewrites the address and credential, never the cap. + register( + &store, + "in", + "Files", + "http://127.0.0.1:7655", + "in-client", + Some("in-client"), + ) + .await + .unwrap(); + assert_eq!( + list(&store).await.unwrap()[0].storage_limit_bytes, + Some(2 * 1024 * 1024 * 1024), + "the app's register never touches the limit" + ); + // The field empties to cleared: NULL is no limit stated. + edit(&store, "in", "Files", "http://127.0.0.1:7655", None) + .await + .unwrap(); + assert_eq!(list(&store).await.unwrap()[0].storage_limit_bytes, None); } } diff --git a/crates/im-core/src/store.rs b/crates/im-core/src/store.rs index 3b6d1e1..4210727 100644 --- a/crates/im-core/src/store.rs +++ b/crates/im-core/src/store.rs @@ -155,7 +155,8 @@ CREATE TABLE IF NOT EXISTS services ( url TEXT NOT NULL, position INTEGER NOT NULL, owner TEXT, - client_id TEXT + client_id TEXT, + storage_limit_bytes INTEGER ); "; @@ -285,6 +286,18 @@ impl Store { .await .map_err(backend)?; } + // The per-service storage cap: the panel's limit on how many + // bytes a sibling that stores (in's Files) may hold. Served to + // the family over `/family` as `limit_bytes`; NULL states no + // limit, and the sibling's own default stands. + if !has_column(&conn, "services", "storage_limit_bytes").await? { + conn.execute( + "ALTER TABLE services ADD COLUMN storage_limit_bytes INTEGER", + (), + ) + .await + .map_err(backend)?; + } if !has_column(&conn, "sessions", "ip").await? { conn.execute("ALTER TABLE sessions ADD COLUMN ip TEXT", ()) .await @@ -403,6 +416,9 @@ pub(crate) fn opt_text(row: &Row, idx: usize) -> Result> { pub(crate) fn int(row: &Row, idx: usize) -> Result { row.get::(idx).map_err(backend) } +pub(crate) fn opt_int(row: &Row, idx: usize) -> Result> { + row.get::>(idx).map_err(backend) +} #[cfg(test)] mod tests { @@ -447,4 +463,58 @@ mod tests { let _store = Store::open(&path).await.unwrap(); assert!(dir.path().join("im.key").exists()); } + + #[tokio::test] + async fn an_old_shaped_services_table_grows_the_limit_column() { + let dir = tempfile::tempdir().unwrap(); + let path = dir.path().join("im.db"); + // The previous generation's services table, before the storage + // limit was a thing. `Store::open` creates the rest of the schema + // around it and ALTERs the column in without touching the row. + { + let db = turso::Builder::new_local(path.to_str().unwrap()) + .build() + .await + .unwrap(); + let conn = db.connect().unwrap(); + conn.execute_batch( + "CREATE TABLE services ( + key TEXT PRIMARY KEY, + name TEXT NOT NULL, + url TEXT NOT NULL, + position INTEGER NOT NULL, + owner TEXT + ); + INSERT INTO services (key, name, url, position, owner) + VALUES ('in', 'Files', 'http://127.0.0.1:7655', 0, NULL);", + ) + .await + .unwrap(); + drop(conn); + drop(db); + } + let store = Store::open(&path).await.unwrap(); + let rows = crate::services::list(&store).await.unwrap(); + assert_eq!(rows.len(), 1); + assert_eq!( + rows[0].storage_limit_bytes, None, + "a pre-limit row reads no limit" + ); + crate::services::edit( + &store, + "in", + "Files", + "http://127.0.0.1:7655", + Some(512 * 1024 * 1024), + ) + .await + .unwrap(); + // A re-boot on the already-migrated table is the guarded no-op, + // and the stored value survives it. + let store = Store::open(&path).await.unwrap(); + assert_eq!( + crate::services::list(&store).await.unwrap()[0].storage_limit_bytes, + Some(512 * 1024 * 1024) + ); + } } diff --git a/crates/im-web/src/admin.rs b/crates/im-web/src/admin.rs index 46a0be6..6eb0acf 100644 --- a/crates/im-web/src/admin.rs +++ b/crates/im-web/src/admin.rs @@ -473,6 +473,9 @@ async fn services_section( // A kept row posts the stored address back in a hidden field: the // form's name change is accepted, and the store refuses only a // *changed* address. + // The storage limit: the panel's field on every row — a kept + // row's cap is im's to set, like its name. An empty amount posts + // no limit; the unit pairs with the amount it edits. let address_field = if kept { format!( r#""#, @@ -485,8 +488,19 @@ async fn services_section( url = url, ) }; + let (limit_amount, limit_unit) = service + .storage_limit_bytes + .map(bytes_as_unit) + .unwrap_or_default(); + let limit_field = format!( + r#""#, + limit_label = t(lang, Key::ServicesStorageLimit), + limit_amount = limit_amount, + mib = if limit_unit == "MiB" { " selected" } else { "" }, + gib = if limit_unit == "GiB" { " selected" } else { "" }, + ); let edit = format!( - r#"
{edit_word}
{edit_title}
{address_field}
"#, + r#"
{edit_word}
{edit_title}
{address_field}{limit_field}
"#, edit_word = t(lang, Key::EditWord), edit_title = i18n::edit_service_title(lang, &name), key = key, @@ -656,13 +670,79 @@ fn client_controls(client_id: &str, name_html: &str, lang: i18n::Lang) -> String format!("{rotate}{revoke_action}") } -/// One user of the services forms: key, name, address. The add form fills -/// all three; the edit form carries the key in its hidden field. +/// One mebibyte / gibibyte in bytes: the only two units the limit field +/// speaks. Raw bytes never reach the browser — the form posts a decimal +/// amount plus one of these units, converted back here. +const MIB_BYTES: f64 = 1_048_576.0; +const GIB_BYTES: f64 = 1_073_741_824.0; + +/// The `(amount, unit)` pair a stored limit edits as: gibibytes once the +/// value reaches one, mebibytes below it, so `2 GiB` edits as `2` GiB +/// rather than `2048` MiB, while a small `512 MiB` cap stays addressable. +fn bytes_as_unit(bytes: u64) -> (String, &'static str) { + if bytes >= GIB_BYTES as u64 { + (trim_amount(bytes as f64 / GIB_BYTES), "GiB") + } else { + (trim_amount(bytes as f64 / MIB_BYTES), "MiB") + } +} + +/// A form amount for a number input: two decimals at most, trailing zeros +/// (and a bare point) trimmed, so the field reads `2` and `2.5`, never +/// `2.00` or `2.5000000001`. +fn trim_amount(value: f64) -> String { + let rounded = (value * 100.0).round() / 100.0; + let text = format!("{rounded:.2}"); + text.trim_end_matches('0').trim_end_matches('.').to_string() +} + +/// The bytes an `(amount, unit)` pair names, or `None` when the pair is +/// not a usable limit: an unknown unit, or an amount that is not a finite +/// non-negative number. +fn unit_bytes(amount: &str, unit: &str) -> Option { + let per = match unit { + "MiB" => MIB_BYTES, + "GiB" => GIB_BYTES, + _ => return None, + }; + let value: f64 = amount.trim().parse().ok()?; + if !value.is_finite() || value < 0.0 { + return None; + } + Some((value * per).round() as u64) +} + +/// The limit a services form posts, in bytes: `Ok(None)` when the amount +/// is blank — the field empties to clear the limit — `Ok(Some(bytes))` +/// when it parses, and `Err` when a non-blank amount is not a usable +/// number against its unit, which is the panel's refusal. +fn posted_limit( + amount: &Option, + unit: &Option, +) -> Result, ()> { + let Some(amount) = amount + .as_deref() + .map(str::trim) + .filter(|amount| !amount.is_empty()) + else { + return Ok(None); + }; + match unit_bytes(amount, unit.as_deref().unwrap_or_default()) { + Some(bytes) => Ok(Some(bytes)), + None => Err(()), + } +} + +/// One user of the services forms: key, name, address — and, on the edit +/// form, the storage limit as an amount plus its unit. The add form posts +/// neither limit field; the empty amount clears. #[derive(Deserialize)] struct ServiceForm { key: String, name: String, url: String, + limit_amount: Option, + limit_unit: Option, } #[route(POST "/admin/services_add")] @@ -671,6 +751,10 @@ async fn services_add(cx: &Cx, Form(input): Form) -> Result me, Err(redirect) => return Ok(redirect), }; + let limit = match posted_limit(&input.limit_amount, &input.limit_unit) { + Ok(limit) => limit, + Err(()) => return back(cx, "services", "&error=bad_service"), + }; let outcome = im_core::services::add( &app(cx).store, &im_core::services::Service { @@ -679,6 +763,7 @@ async fn services_add(cx: &Cx, Form(input): Form) -> Result) -> Result me, Err(redirect) => return Ok(redirect), }; - let outcome = - im_core::services::edit(&app(cx).store, &input.key, &input.name, &input.url).await; + let limit = match posted_limit(&input.limit_amount, &input.limit_unit) { + Ok(limit) => limit, + Err(()) => return back(cx, "services", "&error=bad_service"), + }; + let outcome = im_core::services::edit( + &app(cx).store, + &input.key, + &input.name, + &input.url, + limit, + ) + .await; service_outcome(cx, &me, outcome).await } @@ -2243,6 +2338,7 @@ mod tests { url: "https://wiki.dizey.sh".into(), owner: None, client_id: None, + storage_limit_bytes: None, }, ) .await @@ -2285,4 +2381,111 @@ mod tests { assert_eq!(status, StatusCode::OK); assert_eq!(alias.contains(">Drive"), body.contains(">Drive")); } + + #[tokio::test] + async fn services_edit_saves_the_limit_and_the_rest_is_refused() { + let setup = setup().await; + im_core::services::add( + &setup.store, + &im_core::services::Service { + key: "in".into(), + name: "Files".into(), + url: "https://in.dizey.sh".into(), + owner: None, + client_id: None, + storage_limit_bytes: None, + }, + ) + .await + .unwrap(); + + // The edit posts an amount plus its unit; the row stores bytes. + let (status, location, _) = post_form( + &setup.router, + "/admin/services_edit", + "key=in&name=Files&url=https://in.dizey.sh&limit_amount=2&limit_unit=GiB", + Some(&setup.admin_cookie), + ) + .await; + assert_eq!(status, StatusCode::SEE_OTHER); + assert_eq!( + location.as_deref(), + Some("/admin?section=services&ok=services") + ); + assert_eq!( + im_core::services::list(&setup.store).await.unwrap()[0].storage_limit_bytes, + Some(2 * 1024 * 1024 * 1024) + ); + + // An empty amount clears the limit — no limit stated. + let (status, location, _) = post_form( + &setup.router, + "/admin/services_edit", + "key=in&name=Files&url=https://in.dizey.sh&limit_amount=&limit_unit=GiB", + Some(&setup.admin_cookie), + ) + .await; + assert_eq!(status, StatusCode::SEE_OTHER); + assert_eq!( + location.as_deref(), + Some("/admin?section=services&ok=services") + ); + assert_eq!( + im_core::services::list(&setup.store).await.unwrap()[0].storage_limit_bytes, + None + ); + + // A non-blank amount that is not a usable number is the section's + // refusal, and the stored limit is left alone. + let (status, location, _) = post_form( + &setup.router, + "/admin/services_edit", + "key=in&name=Files&url=https://in.dizey.sh&limit_amount=abc&limit_unit=GiB", + Some(&setup.admin_cookie), + ) + .await; + assert_eq!(status, StatusCode::SEE_OTHER); + assert_eq!( + location.as_deref(), + Some("/admin?section=services&error=bad_service") + ); + assert_eq!( + im_core::services::list(&setup.store).await.unwrap()[0].storage_limit_bytes, + None + ); + + // A non-admin gets the panel's plain redirect; the row never moves. + let (status, location, _) = post_form( + &setup.router, + "/admin/services_edit", + "key=in&name=Files&url=https://in.dizey.sh&limit_amount=2&limit_unit=GiB", + Some(&setup.plain_cookie), + ) + .await; + assert_eq!(status, StatusCode::SEE_OTHER); + assert_eq!(location.as_deref(), Some("/")); + assert_eq!( + im_core::services::list(&setup.store).await.unwrap()[0].storage_limit_bytes, + None + ); + + // The section renders the amount and its unit pair, empty on a + // row with no limit (bundle permitting). + if setup.assets { + let (status, _, body) = get_full( + &setup.router, + "/admin?section=services", + Some(&setup.admin_cookie), + ) + .await; + assert_eq!(status, StatusCode::OK); + assert!(body.contains("name=\"limit_amount\""), "{body}"); + assert!(body.contains("name=\"limit_unit\""), "{body}"); + assert!(body.contains(">GiB"), "{body}"); + assert!( + body.contains("name=\"limit_amount\" min=\"0\" step=\"any\" value=\"\""), + "a no-limit row edits empty: {body}" + ); + } + } } diff --git a/crates/im-web/src/directory.rs b/crates/im-web/src/directory.rs index ed30d68..ce8257b 100644 --- a/crates/im-web/src/directory.rs +++ b/crates/im-web/src/directory.rs @@ -413,6 +413,7 @@ mod tests { url: service.url.clone(), owner: None, client_id: None, + storage_limit_bytes: None, }) .collect() } @@ -675,6 +676,55 @@ mod tests { assert_eq!(family, vec!["in", "im", "iz"], "{body}"); } + #[tokio::test] + async fn family_carries_the_limit_bytes_null_and_stated() { + let Setup { + router, + client_id, + secret, + store, + .. + } = setup().await; + let pair = basic(&client_id, &secret); + // No limit stated anywhere yet: every row's `limit_bytes` is null, + // the shape an unconfigured sibling still parses. + let (status, body) = get_family(&router, Some(pair.clone())).await; + assert_eq!(status, StatusCode::OK); + let family = serde_json::from_str::(&body).unwrap(); + for row in family.as_array().unwrap() { + assert!( + row.get("limit_bytes").unwrap().is_null(), + "no limit yet: {row}" + ); + } + + // The panel sets iz's cap; the next read carries plain bytes. + im_core::services::edit( + &store, + "iz", + "Board", + "http://127.0.0.1:7654", + Some(512 * 1024 * 1024), + ) + .await + .unwrap(); + let (status, body) = get_family(&router, Some(pair)).await; + assert_eq!(status, StatusCode::OK); + let family = serde_json::from_str::(&body).unwrap(); + let iz = family + .as_array() + .unwrap() + .iter() + .find(|row| row["key"] == "iz") + .unwrap(); + assert_eq!( + iz["limit_bytes"], + serde_json::json!(512 * 1024 * 1024), + "{body}" + ); + } + + #[tokio::test] async fn the_panel_edits_the_family_and_every_reader_follows_the_table() { let Setup { @@ -874,6 +924,7 @@ mod tests { url: "http://127.0.0.1:7655".into(), owner: None, client_id: None, + storage_limit_bytes: None, }]; assert!(!im_core::services::seed_from(&store, &reseed).await.unwrap()); let (_, body) = get_family(&router, Some(basic(&client_id, &secret))).await; @@ -946,7 +997,7 @@ mod tests { assert_eq!(body["error"], "owned"); // The keeper's next boot moves the address; the name is the panel's. - im_core::services::edit(&store, "wiki", "Vikipedi", "http://wiki.example") + im_core::services::edit(&store, "wiki", "Vikipedi", "http://wiki.example", None) .await .unwrap(); let (status, body) = post_register( diff --git a/crates/im-web/src/i18n.rs b/crates/im-web/src/i18n.rs index 492c60c..3b6caea 100644 --- a/crates/im-web/src/i18n.rs +++ b/crates/im-web/src/i18n.rs @@ -147,6 +147,7 @@ pub enum Key { ServiceKept, ServiceMoveUp, ServiceMoveDown, + ServicesStorageLimit, SignOutEverywhere, AdminPanelLink, ViewPhotoAria, @@ -525,6 +526,8 @@ pub fn t(lang: Lang, key: Key) -> &'static str { (ServiceMoveUp, Tr) => "Yukarı taşı", (ServiceMoveDown, En) => "Move down", (ServiceMoveDown, Tr) => "Aşağı taşı", + (ServicesStorageLimit, En) => "Storage limit", + (ServicesStorageLimit, Tr) => "Depolama limiti", (SignOutEverywhere, En) => "Sign out everywhere", (SignOutEverywhere, Tr) => "Her yerde oturumu kapat", (AdminPanelLink, En) => "Admin panel", diff --git a/crates/im-web/src/main.rs b/crates/im-web/src/main.rs index 8b8494b..847b49b 100644 --- a/crates/im-web/src/main.rs +++ b/crates/im-web/src/main.rs @@ -174,6 +174,7 @@ async fn seed_services(store: &Store, config: &Config) { url: service.url.clone(), owner: None, client_id: None, + storage_limit_bytes: None, }) .collect(); match im_core::services::seed_from(store, &seed).await {