From 452e413edec78f937f7342f468ef5210eb65094b Mon Sep 17 00:00:00 2001 From: joe Date: Sat, 20 Dec 2025 20:02:17 -0800 Subject: [PATCH] broken --- migrations/.#0001_users.up.sql | 1 + migrations/0001_users.up.sql | 2 ++ src/server.rs | 13 +++++++++++-- 3 files changed, 14 insertions(+), 2 deletions(-) create mode 120000 migrations/.#0001_users.up.sql diff --git a/migrations/.#0001_users.up.sql b/migrations/.#0001_users.up.sql new file mode 120000 index 0000000..ee098d3 --- /dev/null +++ b/migrations/.#0001_users.up.sql @@ -0,0 +1 @@ +ardent@pinkee.17538:1750983153 \ No newline at end of file diff --git a/migrations/0001_users.up.sql b/migrations/0001_users.up.sql index 8b13789..9abfafa 100644 --- a/migrations/0001_users.up.sql +++ b/migrations/0001_users.up.sql @@ -1 +1,3 @@ +CREATE TABLE IF NOT EXISTS users ( +); diff --git a/src/server.rs b/src/server.rs index 282b86c..1c74967 100644 --- a/src/server.rs +++ b/src/server.rs @@ -82,9 +82,18 @@ async fn handle_manage_feed( .. } = message; - let command = parse_command(&mut content.as_str()); + let mut resp: HashMap<&str, String> = HashMap::new(); - Json(HashMap::from([("content", "nee-ope")])).into_response() + let command = parse_command(&mut content.as_str()); + let command = match command { + Err(e) => { + resp["content"] = format!("I did not understand: {e}"); + return Json(resp).into_response(); + } + Ok(c) => c, + }; + + Json(resp).into_response() } else { StatusCode::IM_A_TEAPOT.into_response() }