fake (for now) SiteID for /config

This commit is contained in:
Umputun
2018-02-04 16:09:45 -06:00
parent 5a19a697db
commit 8925da510a
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -112,6 +112,7 @@ type User struct {
Picture string `json:"picture"`
Profile string `json:"profile"`
Admin bool `json:"admin"`
Blocked bool `json:"block"`
}
```
@@ -187,7 +188,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)
- `GET /api/v1/config?site=siteID` - returns configuration (parameters) for given site
```go
type config struct {
Version string `json:"version"`
+1 -1
View File
@@ -314,7 +314,7 @@ func (s *Server) findUserCommentsCtrl(w http.ResponseWriter, r *http.Request) {
renderJSONFromBytes(w, r, data)
}
// GET /config - returns configuration
// GET /config?site=siteID - returns configuration
func (s *Server) configCtrl(w http.ResponseWriter, r *http.Request) {
type config struct {
Version string `json:"version"`