Tweak some things so that we can embed Web UI into Tauri

This commit is contained in:
Igor Katson 2023-12-02 12:48:03 +00:00
parent 950ed816d1
commit 137d12cb9c
No known key found for this signature in database
GPG key ID: B4EC22B66D61A3F5
9 changed files with 105 additions and 44 deletions

View file

@ -74,6 +74,7 @@ impl Serialize for ApiError {
error_kind: &'a str,
human_readable: String,
status: u16,
status_text: String,
#[serde(skip_serializing_if = "Option::is_none")]
id: Option<usize>,
}
@ -85,6 +86,7 @@ impl Serialize for ApiError {
},
human_readable: format!("{self}"),
status: self.status().as_u16(),
status_text: self.status().to_string(),
..Default::default()
};
if let ApiErrorKind::TorrentNotFound(id) = &self.kind {