Change static key to API key
This commit is contained in:
parent
7be66aedb7
commit
5d481ed191
1 changed files with 3 additions and 3 deletions
|
@ -109,9 +109,9 @@ func upload(w http.ResponseWriter, r *http.Request) {
|
|||
|
||||
defer file.Close()
|
||||
|
||||
privkey := r.FormValue("privkey")
|
||||
if privkey != config.StaticKey {
|
||||
msg, _ := json.Marshal(&ErrorMessage{Error: "Static key doesn't match", Code: 2})
|
||||
apikey := r.FormValue("api_key")
|
||||
if apikey != config.StaticKey {
|
||||
msg, _ := json.Marshal(&ErrorMessage{Error: "API key doesn't match", Code: 2})
|
||||
w.Write(msg)
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue