diff --git a/README.md b/README.md index ab2fd74c..2b441e88 100644 --- a/README.md +++ b/README.md @@ -187,6 +187,7 @@ 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) ### Admin diff --git a/app/rest/server.go b/app/rest/server.go index 979132cd..f1da4199 100644 --- a/app/rest/server.go +++ b/app/rest/server.go @@ -317,10 +317,10 @@ func (s *Server) findUserCommentsCtrl(w http.ResponseWriter, r *http.Request) { // GET /config - returns configuration func (s *Server) configCtrl(w http.ResponseWriter, r *http.Request) { type config struct { - Version string - EditDuration int - Admins []string - Auth []string + Version string `json:"version"` + EditDuration int `json:"edit_duration"` + Admins []string `json:"admins"` + Auth []string `json:"auth_providers"` } cnf := config{