Added two possible options for removing blue bar error, will choose one later
Этот коммит содержится в:
@@ -469,7 +469,7 @@ func getMe(c *Context, w http.ResponseWriter, r *http.Request) {
|
|||||||
} else {
|
} else {
|
||||||
result.Data.(*model.User).Sanitize(map[string]bool{})
|
result.Data.(*model.User).Sanitize(map[string]bool{})
|
||||||
w.Header().Set(model.HEADER_ETAG_SERVER, result.Data.(*model.User).Etag())
|
w.Header().Set(model.HEADER_ETAG_SERVER, result.Data.(*model.User).Etag())
|
||||||
w.Header().Set("Expires", "-1")
|
w.Header().Set("Cache-Control", "max-age=0, public") // should refresh
|
||||||
w.Write([]byte(result.Data.(*model.User).ToJson()))
|
w.Write([]byte(result.Data.(*model.User).ToJson()))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -287,7 +287,7 @@ module.exports.getMeSynchronous = function(success, error) {
|
|||||||
if (success) success(data, textStatus, xhr);
|
if (success) success(data, textStatus, xhr);
|
||||||
},
|
},
|
||||||
error: function(xhr, status, err) {
|
error: function(xhr, status, err) {
|
||||||
if (error) {
|
if (xhr.status != 200 && error) {
|
||||||
e = handleError("getMeSynchronous", xhr, status, err);
|
e = handleError("getMeSynchronous", xhr, status, err);
|
||||||
error(e);
|
error(e);
|
||||||
};
|
};
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user