- Don't use "uid", but "channel" - Don't update with name is empty string
This commit is contained in:
parent
2ecbf46cb8
commit
4ebe8f43fe
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue
Block a user