about summary refs log tree commit diff
path: root/src/micropub/get.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/micropub/get.rs')
-rw-r--r--src/micropub/get.rs17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/micropub/get.rs b/src/micropub/get.rs
index e106883..525bf12 100644
--- a/src/micropub/get.rs
+++ b/src/micropub/get.rs
@@ -1,23 +1,26 @@
-use tide::prelude::{Deserialize, json};
-use tide::{Request, Response, Result};
-use crate::ApplicationState;
-use crate::database::{MicropubChannel,Storage};
+use crate::database::{MicropubChannel, Storage};
 use crate::indieauth::User;
+use crate::ApplicationState;
+use tide::prelude::{json, Deserialize};
+use tide::{Request, Response, Result};
 
 #[derive(Deserialize)]
 struct QueryOptions {
     q: String,
-    url: Option<String>
+    url: Option<String>,
 }
 
 pub async fn get_handler<Backend>(req: Request<ApplicationState<Backend>>) -> Result
 where
-    Backend: Storage + Send + Sync
+    Backend: Storage + Send + Sync,
 {
     let user = req.ext::<User>().unwrap();
     let backend = &req.state().storage;
     let media_endpoint = &req.state().media_endpoint;
-    let query = req.query::<QueryOptions>().unwrap_or(QueryOptions { q: "".to_string(), url: None });
+    let query = req.query::<QueryOptions>().unwrap_or(QueryOptions {
+        q: "".to_string(),
+        url: None,
+    });
     match &*query.q {
         "config" => {
             let channels: Vec<MicropubChannel>;