first drafts for inventory sync page
This commit is contained in:
@@ -14,6 +14,10 @@ func Write(w http.ResponseWriter, r *http.Request, res Response) {
|
||||
hdrs.Add("Set-Cookie", ck.String())
|
||||
}
|
||||
|
||||
if ct, ok := res.getContentType(); ok {
|
||||
hdrs.Add("Content-Type", ct)
|
||||
}
|
||||
|
||||
if code, to, ok := res.getRedirect(); ok {
|
||||
http.Redirect(w, r, to, code.Int())
|
||||
return
|
||||
@@ -44,7 +48,7 @@ func Write(w http.ResponseWriter, r *http.Request, res Response) {
|
||||
}
|
||||
|
||||
func WriteError(w http.ResponseWriter, err error) {
|
||||
var status int
|
||||
status := http.StatusInternalServerError
|
||||
|
||||
if e, ok := GetError(err); ok {
|
||||
if status, ok = e.GetStatus(); !ok {
|
||||
|
||||
Reference in New Issue
Block a user