Skip to content

Commit

Permalink
feat: support mod references in rest endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
Vilsol committed Oct 20, 2023
1 parent 54d096c commit 7807b9e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion db/postgres/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ func GetAllModVersionsWithDependencies(ctx context.Context, modID string) []Tiny
}

var versions []TinyVersion
DBCtx(ctx).Debug().
DBCtx(ctx).
Preload("Dependencies").
Preload("Targets").
Where("approved = ? AND denied = ?", true, false).
Expand Down
2 changes: 1 addition & 1 deletion nodes/mod.go
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ func downloadModVersionTarget(c echo.Context) error {
func getAllModVersions(c echo.Context) (interface{}, *ErrorResponse) {
modID := c.Param("modId")

mod := postgres.GetModByID(c.Request().Context(), modID)
mod := postgres.GetModByIDOrReference(c.Request().Context(), modID)

if mod == nil {
return nil, &ErrorModNotFound
Expand Down

0 comments on commit 7807b9e

Please sign in to comment.