Skip to content

Commit

Permalink
Updated undelete endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
mdecimus committed Aug 17, 2024
1 parent d2d7273 commit aba99dd
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
3 changes: 3 additions & 0 deletions src/components/messages/alert.rs
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,9 @@ impl From<ReloadSettings> for Alert {
ConfigWarning::Build { error } => {
format!("Error for {key:?}: {error}")
}
ConfigWarning::Parse { error } => {
format!("Warning: Parse error for {key:?}: {error}")
}
}}

</li>
Expand Down
1 change: 1 addition & 0 deletions src/pages/config/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ pub enum ConfigWarning {
AppliedDefault { default: String },
Unread { value: String },
Build { error: String },
Parse { error: String },
}

#[derive(Debug, Clone, PartialEq, Eq, Deserialize)]
Expand Down
4 changes: 2 additions & 2 deletions src/pages/config/schema/storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ impl Builder<Schemas, ()> {
.default("30d")
.typ(Type::Duration)
.build()
.new_field("enterprise.undelete-period")
.new_field("storage.undelete.hold-for")
.label("Un-delete period ⭐")
.help(concat!(
"How long to keep deleted emails before they are permanently ",
Expand All @@ -184,7 +184,7 @@ impl Builder<Schemas, ()> {
.build()
.new_form_section()
.title("Blob Store")
.fields(["storage.blob", "enterprise.undelete-period"])
.fields(["storage.blob", "storage.undelete.hold-for"])
.build()
.new_form_section()
.title("Full Text Index Store")
Expand Down
4 changes: 2 additions & 2 deletions src/pages/enterprise/undelete.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ pub fn UndeleteList() -> impl IntoView {
let auth = auth.get_untracked();

async move {
HttpRequest::get(("/api/pro/undelete", account))
HttpRequest::get(("/api/store/undelete", account))
.with_authorization(&auth)
.with_parameter("page", page.to_string())
.with_parameter("limit", PAGE_SIZE.to_string())
Expand Down Expand Up @@ -185,7 +185,7 @@ pub fn UndeleteList() -> impl IntoView {
}
}

match HttpRequest::post(("/api/pro/undelete", account))
match HttpRequest::post(("/api/store/undelete", account))
.with_authorization(&auth)
.with_body(request)
.unwrap()
Expand Down

0 comments on commit aba99dd

Please sign in to comment.