aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lib.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 09e092c..e6bb0f6 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -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>> {