From 22435465d289b0facf4c5c718221df3603720c98 Mon Sep 17 00:00:00 2001 From: Brendan Golden Date: Fri, 26 May 2023 00:58:18 +0100 Subject: [PATCH] fmt: fmt and clippy --- src/main.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/main.rs b/src/main.rs index 1ad2e20..f8be045 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,4 +1,3 @@ - use ldap3::{LdapConn, Mod, Scope, SearchEntry}; use std::collections::HashSet; @@ -10,8 +9,8 @@ use dotenv::dotenv; use skynet_ldap_server::db_init; use sqlx::{Pool, Sqlite}; use std::env; -use tide::prelude::*; -use tide::{Request, Response}; +use tide::prelude::{json, Deserialize}; +use tide::Request; #[derive(Clone)] struct State { @@ -149,6 +148,6 @@ async fn post_update_ldap(mut req: Request) -> tide::Result { ldap.modify(&dn, mods)?.success()?; ldap.unbind()?; - - Ok(format!("Hello, {}! I've put in an order for {} shoes", "name", "legs").into()) + + Ok(json!({"result": "success"}).into()) }