user-service 0.4.1

A user management microservice.
Documentation
use super::*;

pub mod delete;
pub mod get;
pub mod put;

pub mod tokens;

mod middleware;

#[derive(Deserialize)]
pub struct Info {
    user_id: i32,
}

pub fn service() -> Scope<
    impl ServiceFactory<
        actix_web::dev::ServiceRequest,
        Config = (),
        Response = actix_web::dev::ServiceResponse,
        Error = actix_web::Error,
        InitError = (),
    >,
> {
    web::scope("/{user_id}")
        .wrap(middleware::Exists)
        .service(delete::route)
        .service(get::route)
        .service(put::route)
        .service(tokens::service())
}