From fdfe532e73fc57a9bfdc106f0d21848cdc0e4c44 Mon Sep 17 00:00:00 2001 From: Umputun Date: Sun, 4 Feb 2018 15:52:14 -0600 Subject: [PATCH] add config struct --- README.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 2b441e88..dc792cb4 100644 --- a/README.md +++ b/README.md @@ -188,7 +188,15 @@ Sort can be `time` or `score`. Supported sort order with prefix -/+, i.e. `-time - `GET /api/v1/user` - get user info, _auth required_ - `PUT /api/v1/vote/{id}?site=site-id&url=post-url&vote=1` - vote for comment. `vote`=1 will increase score, -1 decrease. _auth required_ - `GET /api/v1/config` - returns configuration (parameters) - + ```go + type config struct { + Version string `json:"version"` + EditDuration int `json:"edit_duration"` // seconds + Admins []string `json:"admins"` + Auth []string `json:"auth_providers"` + } + ``` + ### Admin - `DELETE /api/v1/admin/comment/{id}?site=site-id&url=post-url` - delete comment by `id`. _auth and admin required_