Fix error when parsing hashes from uris

Signed-off-by: trivernis <trivernis@protonmail.com>
pull/4/head
trivernis 3 years ago
parent 2a69c5b748
commit 68b8aa39c9

@ -1,3 +1,4 @@
use crate::tauri_plugin::error::PluginError;
use crate::tauri_plugin::state::{ApiState, BufferState};
use crate::types::identifier::FileIdentifier;
use std::borrow::Cow;
@ -66,7 +67,9 @@ fn thumb_scheme<R: Runtime>(app: &AppHandle<R>, request: &Request) -> Result<Res
let buf_state = app.state::<BufferState>();
let url = Url::parse(request.uri())?;
let hash = url.path();
let hash = url
.domain()
.ok_or_else(|| PluginError::from("Missing Domain"))?;
let query_pairs = url
.query_pairs()

Loading…
Cancel
Save