Skip to content

Commit

Permalink
fix: move slugcheck to correct line
Browse files Browse the repository at this point in the history
  • Loading branch information
prithvidasgupta authored and LinkinStars committed Apr 25, 2024
1 parent 95f03bc commit 4269a11
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions internal/service/tag_common/tag_common.go
Expand Up @@ -837,16 +837,18 @@ func (ts *TagCommonService) UpdateTag(ctx context.Context, req *schema.UpdateTag
if !exist {
return errors.BadRequest(reason.TagNotFound)
}

//Adding equivalent slug formatting for tag update
slugName := strings.ReplaceAll(req.SlugName, " ", "-")
slugName = strings.ToLower(slugName)

//If the content is the same, ignore it
if tagInfo.OriginalText == req.OriginalText &&
tagInfo.DisplayName == req.DisplayName &&
tagInfo.SlugName == req.SlugName {
tagInfo.SlugName == slugName {
return nil
}

//Adding equivalent slug formatting for tag update
slugName := strings.ReplaceAll(req.SlugName, " ", "-")
slugName = strings.ToLower(slugName)
tagInfo.SlugName = slugName
tagInfo.DisplayName = req.DisplayName
tagInfo.OriginalText = req.OriginalText
Expand Down

0 comments on commit 4269a11

Please sign in to comment.