Skip to content

Commit

Permalink
修正GetRange函数算法
Browse files Browse the repository at this point in the history
  • Loading branch information
JacobLai committed Aug 16, 2016
1 parent a8d2762 commit 14b8601
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/Coolpy/Photos/PhotoApi.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,13 @@ func PhotoGetByKey(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
}
ukey := r.Header.Get("U-ApiKey")
if ukey == "" {
fmt.Fprintf(w, `{"ok":%d,"err":"%v"}`, 0, "ukey not post")
return
qs := r.URL.Query()
if qs.Get("ukey") != "" {
ukey = qs.Get("ukey")
} else {
fmt.Fprintf(w, `{"ok":%d,"err":"%v"}`, 0, "ukey not post")
return
}
}
_, err := Account.GetUkeyFromDb(ukey)
if err != nil {
Expand Down

0 comments on commit 14b8601

Please sign in to comment.