Hastic standalone https://hastic.io
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
491 B

3 years ago
use crate::api::API;
3 years ago
use crate::services::user_service;
3 years ago
use warp::{Rejection, Reply};
use warp::filters::method::post;
use warp::{Filter, http::Response };
pub fn get_route() -> impl Filter<Extract = impl Reply, Error = Rejection> + Clone {
return warp::path!("api" / "auth" / "signin")
.and(post())
.and(warp::body::json())
.map(|user: user_service::User| {
let s = format!("Hello, {}!", &user.username);
API::builder(&s)
});
}