fix permission app error with updatePost (#6749)
Этот коммит содержится в:
коммит произвёл
George Goldberg
родитель
ffaab0bf22
Коммит
f2abb9d8eb
@@ -302,6 +302,10 @@ func searchPosts(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
func updatePost(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
c.RequirePostId()
|
||||
if c.Err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
post := model.PostFromJson(r.Body)
|
||||
|
||||
if post == nil {
|
||||
|
||||
@@ -137,6 +137,8 @@ func TestUpdatePost(t *testing.T) {
|
||||
|
||||
msg := "zz" + model.NewId() + " update post"
|
||||
rpost.Message = msg
|
||||
rpost.UserId = ""
|
||||
|
||||
rupost, resp := Client.UpdatePost(rpost.Id, rpost)
|
||||
CheckNoError(t, resp)
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user