Skip to content

Commit

Permalink
fix single directory resource listing
Browse files Browse the repository at this point in the history
  • Loading branch information
vintikzzz committed Oct 8, 2024
1 parent faef35c commit b3bfe86
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions handlers/resource/get.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,9 @@ func (s *Handler) get(c *gin.Context) {
d.List = list
}
d.Item, err = s.getBestItem(ctx, list, args)
if len(list.Items) == 1 && d.Item == nil {
d.List = list
}
if err != nil {
indexTpl.HTMLWithErr(errors.Wrap(err, "failed to get item"), http.StatusInternalServerError, c, d)
return
Expand Down

0 comments on commit b3bfe86

Please sign in to comment.