1
0
Fork 0

Add template

This commit is contained in:
Florian RICHER 2021-07-08 23:29:40 +02:00
parent 4bee273216
commit 2d1d5b66a9
8 changed files with 727 additions and 44 deletions

View file

@ -1,8 +1,17 @@
use rocket::get;
use rocket::{get, catch};
use rocket::serde::json::{Value, json};
pub mod tasks_controller;
#[get("/")]
pub fn index() -> &'static str {
"Hello, world!"
}
#[catch(404)]
pub fn not_found() -> Value {
json!({
"status": "error",
"reason": "Resource was not found."
})
}