Browse Source

fix PUT /api/config without token

fatedier 6 years ago
parent
commit
5bc7fe2cea
1 changed files with 2 additions and 0 deletions
  1. 2 0
      client/admin_api.go

+ 2 - 0
client/admin_api.go

@@ -311,6 +311,8 @@ func (svr *Service) apiPutConfig(w http.ResponseWriter, r *http.Request) {
 				newRows = append(newRows, token)
 			}
 		}
+	} else {
+		newRows = tmpRows
 	}
 	content = strings.Join(newRows, "\n")