diff --git a/src/api.rs b/src/api.rs index 2ddd2ef..3f84780 100644 --- a/src/api.rs +++ b/src/api.rs @@ -3,6 +3,9 @@ use ldap3::exop::PasswordModify; use ldap3::result::{LdapError, Result}; use rocket_contrib::json::Json; +use rocket::post; +use serde_derive::{Deserialize, Serialize}; + use crate::config::Config; #[derive(Deserialize)] diff --git a/src/config.rs b/src/config.rs index 907d583..59026f1 100644 --- a/src/config.rs +++ b/src/config.rs @@ -2,6 +2,8 @@ use std::io::BufReader; use std::fs::File; use handlebars::Handlebars; +use serde_derive::Deserialize; +use serde_json::json; use crate::exit::exit_with_error; diff --git a/src/main.rs b/src/main.rs index 91e93d3..651484c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,16 +1,12 @@ #![feature(proc_macro_hygiene, decl_macro)] -#[macro_use] extern crate clap; -#[macro_use] extern crate rocket; -#[macro_use] extern crate serde_derive; -#[macro_use] extern crate serde_json; - mod api; mod config; mod exit; mod r#static; -use clap::{Arg, App}; +use clap::{Arg, App, crate_version}; +use rocket::routes; use rocket::config::{Config, Environment}; use crate::config::load_config; diff --git a/src/static.rs b/src/static.rs index 50c8ebc..8d772f5 100644 --- a/src/static.rs +++ b/src/static.rs @@ -2,6 +2,8 @@ use rocket::http::{ContentType, Status}; use rocket::request::Request; use rocket::response::{content, Responder, Response}; +use rocket::get; + pub struct Svg(pub R); impl<'r, R: Responder<'r>> Responder<'r> for Svg {