Can download files
This commit is contained in:
@ -121,6 +121,11 @@ async fn main() -> std::io::Result<()> {
|
||||
)
|
||||
// Files controller
|
||||
.route("/api/file", web::post().to(files_controller::upload))
|
||||
.route(
|
||||
"/api/file/{file_id}",
|
||||
web::get().to(files_controller::download),
|
||||
)
|
||||
// TODO Delete file
|
||||
// Static assets
|
||||
.route("/", web::get().to(static_controller::root_index))
|
||||
.route(
|
||||
|
Reference in New Issue
Block a user