Fixes for Indigenous
All checks were successful
the build was successful

- Don't use "uid", but "channel"
- Don't update with name is empty string
This commit is contained in:
Peter Stuifzand 2019-02-16 08:18:57 +01:00
parent 2ecbf46cb8
commit 4ebe8f43fe
Signed by: peter
GPG Key ID: 374322D56E5209E8
2 changed files with 2 additions and 2 deletions

View File

@ -244,7 +244,7 @@ func (c *Client) ChannelsCreate(name string) (microsub.Channel, error) {
func (c *Client) ChannelsUpdate(uid, name string) (microsub.Channel, error) {
args := make(map[string]string)
args["name"] = name
args["uid"] = uid
args["channel"] = uid
res, err := c.microsubPostRequest("channels", args)
if err != nil {
return microsub.Channel{}, err

View File

@ -140,7 +140,7 @@ func (h *microsubHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
return
}
respondJSON(w, channel)
} else {
} else if name != "" {
channel, err := h.backend.ChannelsUpdate(uid, name)
if err != nil {
http.Error(w, err.Error(), 500)