Skip to content

Commit

Permalink
feat(go/season-stat): retrieve season by id or slug
Browse files Browse the repository at this point in the history
  • Loading branch information
MikaelVallenet committed Apr 5, 2023
1 parent c896853 commit 51a4c2c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions go/pkg/pwapi/api_admin-season-stats.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package pwapi

import (
"context"

Check failure on line 4 in go/pkg/pwapi/api_admin-season-stats.go

View workflow job for this annotation

GitHub Actions / golangci-lint

File is not `goimports`-ed (goimports)
"pathwar.land/pathwar/v2/go/pkg/pwdb"

"pathwar.land/pathwar/v2/go/pkg/errcode"
)
Expand All @@ -14,5 +15,10 @@ func (svc *service) AdminSeasonStats(ctx context.Context, in *AdminSeasonStats_I
return nil, errcode.ErrMissingInput
}

_, err := pwdb.GetIDBySlugAndKind(svc.db, in.SeasonID, "season")
if err != nil {
return nil, err
}

return &AdminSeasonStats_Output{}, nil
}

0 comments on commit 51a4c2c

Please sign in to comment.