Implement posts endpoints for APIv4 (#5480)
* Implement delete post endpoint for apiv4 * Implement POST search post endpoint for APIv4 * removed delete post quotes * rearrange formatting
Этот коммит содержится в:
коммит произвёл
Joram Wilander
родитель
a14e44b4ec
Коммит
9646bddd21
@@ -400,6 +400,7 @@ func GetPostsAroundPost(postId, channelId string, offset, limit int, before bool
|
||||
|
||||
func DeletePost(postId string) (*model.Post, *model.AppError) {
|
||||
if result := <-Srv.Store.Post().GetSingle(postId); result.Err != nil {
|
||||
result.Err.StatusCode = http.StatusBadRequest
|
||||
return nil, result.Err
|
||||
} else {
|
||||
post := result.Data.(*model.Post)
|
||||
|
||||
Ссылка в новой задаче
Block a user