WIP uploads

This commit is contained in:
Daniel Løvbrøtte Olsen
2020-03-30 19:43:37 +02:00
parent f378f356e9
commit cf49211b74
2 changed files with 17 additions and 1 deletions
+9
View File
@@ -3,6 +3,7 @@
#[macro_use] extern crate rocket;
use rocket::State;
use rocket::response::status::NotFound;
use rocket::Data;
use rocket_contrib::json::Json;
use serde_json::Value;
@@ -103,6 +104,14 @@ fn edit_status(id: Uuid, status: String, shared: State<SharedState>, remote_addr
Ok("Status changed".to_string())
}
#[post("/", data = "<video>")]
fn upload(video: Data) -> Result<String, std::io::Error> {
}
#[post("/add_job", format = "json", data = "<message>")]
fn add_job(message: Json<workunit::WDesc>, shared: State<SharedState>) {
println!("{:#?}", message);