user-auth store frontend and backend
This commit is contained in:
@@ -254,6 +254,7 @@ pub async fn main() {
|
||||
.route("/api/create", post(create_book))
|
||||
.route("/api/update", post(update_book))
|
||||
.route("/api/delete/:id", get(delete_book))
|
||||
.route("/api/authentication_check", get(authentication_check))
|
||||
.route_layer(RequireAuthorizationLayer::<booksman_orm::AxumUser>::login())
|
||||
.route("/api/list", get(list_book))
|
||||
.route("/api/list_search", get(list_search_book))
|
||||
@@ -346,6 +347,12 @@ async fn list_users(
|
||||
auth.logout().await;
|
||||
}
|
||||
|
||||
//https://openlibrary.org/api/books?bibkeys=ISBN:9780980200447&jscmd=data&format=json
|
||||
async fn authentication_check(
|
||||
Extension(user): Extension<booksman_orm::AxumUser>,
|
||||
) -> impl IntoResponse {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
//https://openlibrary.org/api/books?bibkeys=ISBN:9780980200447&jscmd=data&format=json
|
||||
|
||||
Reference in New Issue
Block a user