Skip to content

Implement first crude /stats endpoint

Otto Kekäläinen requested to merge feature/api-stats-v0 into master

Example output:

curl -iLsS http://localhost:9000/api/v0/stats
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 359

{
    "success": true,
    "data": {
        "submitters": {
            "since": "2020-03-20T15:32:55",
            "total": 9,
            "today": 1,
            "past_7_days": 9
        },
        "submissions": {
            "since": "2020-03-20T15:32:55",
            "total": 13,
            "today": 5,
            "past_7_days": 13
        }
    }
}

** Don't merge this yet! I need one open MR to be able to develop the CI pipeline nicely. **

Edited by Otto Kekäläinen

Merge request reports