mirror of https://gitee.com/answerdev/answer.git
Merge branch 'ai/0.4.0/tag' into test
This commit is contained in:
commit
c9821f80ff
|
@ -143,6 +143,13 @@ func (ts *TagCommonService) GetTagListByNames(ctx context.Context, tagNames []st
|
|||
}
|
||||
|
||||
func (ts *TagCommonService) ExistRecommend(ctx context.Context, tags []*schema.TagItem) (bool, error) {
|
||||
taginfo, err := ts.siteInfoService.GetSiteWrite(ctx)
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
if !taginfo.RequiredTag {
|
||||
return true, nil
|
||||
}
|
||||
tagNames := make([]string, 0)
|
||||
for _, item := range tags {
|
||||
tagNames = append(tagNames, item.SlugName)
|
||||
|
|
Loading…
Reference in New Issue