Add template
This commit is contained in:
parent
4bee273216
commit
2d1d5b66a9
8 changed files with 727 additions and 44 deletions
|
@ -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."
|
||||
})
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue