map config json
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
+4
-4
@@ -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{
|
||||
|
||||
Reference in New Issue
Block a user