summaryrefslogtreecommitdiff
path: root/src/routes
diff options
context:
space:
mode:
authorDaniel Hader <[email protected]>2026-05-10 10:15:56 -0500
committerDaniel Hader <[email protected]>2026-05-10 10:15:56 -0500
commita005add5513182abb0b1230cf514c7a45b290e4b (patch)
tree5fb5c249d8828ba62f4ae91cbe0e8b5a440be570 /src/routes
database with problem model
Diffstat (limited to 'src/routes')
-rw-r--r--src/routes/problems.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/routes/problems.rs b/src/routes/problems.rs
new file mode 100644
index 0000000..caeb808
--- /dev/null
+++ b/src/routes/problems.rs
@@ -0,0 +1,17 @@
+use axum::response::Json;
+use serde::Serialize;
+
+#[derive(Serialize)]
+pub struct Problem {
+ title: String,
+ description: String,
+}
+
+pub async fn get_problems() -> Json<Vec<Problem>> {
+ let problem = Problem {
+ title: "test problem".into(),
+ description: "the description of a test problem".into(),
+ };
+ Json(vec![problem])
+}
+