Skip to content

start implementing settings and admin API

Guillaume Desmottes requested to merge 112-admin into main

Set a password: $ curl 'http://localhost:1848/api/admin/config' -X POST -H 'Content-Type: application/json' -d '{"admin":{"password": "badger"}}'

Retrieve a token: $ curl 'http://localhost:1848/api/admin/auth' -X POST -H 'Content-Type: application/json' --data-raw '{"password":"badger"}' $ export TOKEN=...

Retrieve config: $ curl 'http://localhost:1848/api/admin/config' -X GET -H 'Content-Type: application/json' -H "Authorization: Bearer $TOKEN"

Update password: $ curl 'http://localhost:1848/api/admin/config' -X POST -H 'Content-Type: application/json' -H "Authorization: Bearer $TOKEN" -d '{"admin":{"password": "mushroom"}}'

Closes #112 (closed)

Merge request reports