2022-06-21 11:00:56 +00:00
|
|
|
mod create_dir;
|
|
|
|
mod delete;
|
|
|
|
mod download;
|
|
|
|
mod list;
|
|
|
|
mod upload;
|
2022-04-24 19:31:50 +00:00
|
|
|
|
|
|
|
pub fn app() -> axum::Router {
|
2022-05-07 13:19:36 +00:00
|
|
|
use axum::routing::{delete, get, post};
|
2022-04-24 19:31:50 +00:00
|
|
|
|
2022-04-24 20:07:41 +00:00
|
|
|
axum::Router::new()
|
|
|
|
.route("/list", post(list::handle))
|
|
|
|
.route("/upload", post(upload::handle))
|
2022-06-08 17:08:06 +00:00
|
|
|
.route("/delete", delete(delete::handle))
|
2022-05-07 13:19:36 +00:00
|
|
|
.route("/download", get(download::handle))
|
2022-05-27 13:58:16 +00:00
|
|
|
.route("/createdir", post(create_dir::handle))
|
2022-04-24 19:31:50 +00:00
|
|
|
}
|