Skip to content

Commit

Permalink
fixes | drop redundancies
Browse files Browse the repository at this point in the history
  • Loading branch information
garrettladley committed Feb 11, 2024
1 parent 5f8c251 commit bb61c0c
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 20 deletions.
10 changes: 0 additions & 10 deletions backend/src/controllers/tag.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,13 +117,3 @@ func (t *TagController) DeleteTag(c *fiber.Ctx) error {

return c.SendStatus(fiber.StatusNoContent)
}

func (t *TagController) GetTagClubs(c *fiber.Ctx) error {
tag, err := t.tagService.GetTagClubs(c.Params("id"))

if err != nil {
return err.FiberError(c)
}

return c.Status(fiber.StatusOK).JSON(&tag)
}
10 changes: 0 additions & 10 deletions backend/src/services/tag.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ type TagServiceInterface interface {
GetTag(id string) (*models.Tag, *errors.Error)
UpdateTag(id string, tagBody models.TagRequestBody) (*models.Tag, *errors.Error)
DeleteTag(id string) *errors.Error
GetTagClubs(id string) ([]models.Club, *errors.Error)
}

type TagService struct {
Expand Down Expand Up @@ -77,12 +76,3 @@ func (t *TagService) DeleteTag(tagID string) *errors.Error {

return transactions.DeleteTag(t.DB, *tagIDAsUUID)
}

func (t *TagService) GetTagClubs(id string) ([]models.Club, *errors.Error) {
idAsUUID, err := utilities.ValidateID(id)
if err != nil {
return nil, &errors.FailedToValidateID
}

return transactions.GetTagClubs(t.DB, *idAsUUID)
}

0 comments on commit bb61c0c

Please sign in to comment.