diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/lib.rs | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -19,12 +19,13 @@ use rocket::{ get, - response::content::Json, routes, }; use rocket_contrib::{ database, databases::diesel, + json, + json::JsonValue, }; use std::collections::HashMap; use std::error::Error; @@ -34,8 +35,8 @@ use std::result::Result; struct DbConn(diesel::PgConnection); #[get("/")] -fn get_rooms(_db: DbConn) -> Json<String> { - Json("[]".into()) +fn get_rooms(_db: DbConn) -> JsonValue { + json!([]) } pub fn build_rocket() -> Result<rocket::Rocket, Box<dyn Error>> { |