@@ -200,6 +200,7 @@ func (ts *TagCommonService) ExistRecommend(ctx context.Context, tags []*schema.T
200
200
}
201
201
tagNames := make ([]string , 0 )
202
202
for _ , item := range tags {
203
+ item .SlugName = strings .ReplaceAll (item .SlugName , " " , "-" )
203
204
tagNames = append (tagNames , item .SlugName )
204
205
}
205
206
list , err := ts .GetTagListByNames (ctx , tagNames )
@@ -233,7 +234,7 @@ func (ts *TagCommonService) AddTag(ctx context.Context, req *schema.AddTagReq) (
233
234
return nil , errors .BadRequest (reason .TagAlreadyExist )
234
235
}
235
236
tagInfo := & entity.Tag {
236
- SlugName : req .SlugName ,
237
+ SlugName : strings . ReplaceAll ( req .SlugName , " " , "-" ) ,
237
238
DisplayName : req .DisplayName ,
238
239
OriginalText : req .OriginalText ,
239
240
ParsedText : req .ParsedText ,
@@ -557,7 +558,7 @@ func (ts *TagCommonService) ObjectChangeTag(ctx context.Context, objectTagData *
557
558
continue
558
559
}
559
560
item := & entity.Tag {}
560
- item .SlugName = tag .SlugName
561
+ item .SlugName = strings . ReplaceAll ( tag .SlugName , " " , "-" )
561
562
item .DisplayName = tag .DisplayName
562
563
item .OriginalText = tag .OriginalText
563
564
item .ParsedText = tag .ParsedText
0 commit comments