fmt: fmt and clippy

This commit is contained in:
silver 2023-05-26 00:58:18 +01:00
parent 311029574f
commit 22435465d2

View file

@ -1,4 +1,3 @@
use ldap3::{LdapConn, Mod, Scope, SearchEntry}; use ldap3::{LdapConn, Mod, Scope, SearchEntry};
use std::collections::HashSet; use std::collections::HashSet;
@ -10,8 +9,8 @@ use dotenv::dotenv;
use skynet_ldap_server::db_init; use skynet_ldap_server::db_init;
use sqlx::{Pool, Sqlite}; use sqlx::{Pool, Sqlite};
use std::env; use std::env;
use tide::prelude::*; use tide::prelude::{json, Deserialize};
use tide::{Request, Response}; use tide::Request;
#[derive(Clone)] #[derive(Clone)]
struct State { struct State {
@ -149,6 +148,6 @@ async fn post_update_ldap(mut req: Request<State>) -> tide::Result {
ldap.modify(&dn, mods)?.success()?; ldap.modify(&dn, mods)?.success()?;
ldap.unbind()?; ldap.unbind()?;
Ok(format!("Hello, {}! I've put in an order for {} shoes", "name", "legs").into()) Ok(json!({"result": "success"}).into())
} }