Skip to content

Commit

Permalink
rename fileId to LinkId
Browse files Browse the repository at this point in the history
  • Loading branch information
kingjulienboss committed Apr 9, 2024
1 parent c40a38f commit febc89c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion controllers/CreateTagController.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ func CreateTagController(c echo.Context) error {
return c.String(status, err.Error())
}

status, dbTag, err := logic.CreateTag(validator.Name, validator.FileID, c.Get("UserID").(uint))
status, dbTag, err := logic.CreateTag(validator.Name, validator.LinkId, c.Get("UserID").(uint))

if err != nil {
return c.String(status, err.Error())
Expand Down
2 changes: 1 addition & 1 deletion controllers/DeleteTagController.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ func DeleteTagController(c echo.Context) error {
return c.String(status, err.Error())
}

status, err := logic.DeleteTag(validator.TagID, validator.FileID, c.Get("UserID").(uint))
status, err := logic.DeleteTag(validator.TagID, validator.LinkId, c.Get("UserID").(uint))

if err != nil {
return c.String(status, err.Error())
Expand Down
4 changes: 2 additions & 2 deletions models/Tag.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ type TagLinks struct {

type TagCreateValidation struct {
Name string `validate:"required,min=1,max=120" json:"Name" form:"Name"`
FileID uint `validate:"required,number" json:"FileID" form:"FileID"`
LinkId uint `validate:"required,number" json:"LinkId" form:"LinkId"`
}

type TagDeleteValidation struct {
TagID uint `validate:"required,number" json:"TagID" form:"TagID"`
FileID uint `validate:"required,number" json:"FileID" form:"FileID"`
LinkId uint `validate:"required,number" json:"LinkId" form:"LinkId"`
}

0 comments on commit febc89c

Please sign in to comment.