summaryrefslogtreecommitdiff
path: root/src/routes/problems.rs
blob: caeb80877a777d9dc062a15d612636e2f16aa01e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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])
}