diff options
| author | Daniel Hader <[email protected]> | 2026-05-10 10:15:56 -0500 |
|---|---|---|
| committer | Daniel Hader <[email protected]> | 2026-05-10 10:15:56 -0500 |
| commit | a005add5513182abb0b1230cf514c7a45b290e4b (patch) | |
| tree | 5fb5c249d8828ba62f4ae91cbe0e8b5a440be570 /src/routes/problems.rs | |
database with problem model
Diffstat (limited to 'src/routes/problems.rs')
| -rw-r--r-- | src/routes/problems.rs | 17 |
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]) +} + |
