[MM-38239 & MM-39788] Recent files causing crash (#18942)
* wip * adding tests for new endpoint * tool updates * new function for getting postsByIds * fixing test * adding limit of 1000 to post query * fixing PR comments * fixing permission logic Co-authored-by: Collin <collineng@gmail.com> Co-authored-by: Collin Eng <eng.engineereng@gmail.com> Co-authored-by: Benjamin Cooke <benjamincooke@Benjamins-MacBook-Pro.local> Co-authored-by: Mattermod <mattermod@users.noreply.github.com> Co-authored-by: Benjamin Cooke <benjamincooke@Benjamins-MBP.ht.home>
Этот коммит содержится в:
@@ -1978,6 +1978,9 @@ func (s *SqlPostStore) GetPostsByIds(postIds []string) ([]*model.Post, error) {
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "failed to find Posts")
|
||||
}
|
||||
if len(posts) == 0 {
|
||||
return nil, store.NewErrNotFound("Post", fmt.Sprintf("postIds=%v", postIds))
|
||||
}
|
||||
return posts, nil
|
||||
}
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user