error msg

This commit is contained in:
aichy126 2022-11-16 10:32:29 +08:00
parent 2abec78482
commit 67b7e7d2b1
1 changed files with 8 additions and 8 deletions

View File

@ -73,16 +73,16 @@ func (ts *TagCommonService) GetSiteWriteRecommendTag(ctx context.Context) (tags
return tags, nil
}
func (ts *TagCommonService) SetSiteWriteRecommendTag(ctx context.Context, tags []string, required bool, userID string) (err error) {
func (ts *TagCommonService) SetSiteWriteRecommendTag(ctx context.Context, tags []string, required bool, userID string) (msg string, err error) {
err = ts.UpdateTag(ctx, tags, userID)
if err != nil {
return err
return err.Error(), err
}
err = ts.SetTagsAttribute(ctx, tags, "recommend", true)
if err != nil {
return err
return "", err
}
return nil
return "", nil
}
func (ts *TagCommonService) GetSiteWriteReservedTag(ctx context.Context) (tags []string, err error) {
@ -94,16 +94,16 @@ func (ts *TagCommonService) GetSiteWriteReservedTag(ctx context.Context) (tags [
return tags, nil
}
func (ts *TagCommonService) SetSiteWriteReservedTag(ctx context.Context, tags []string, userID string) (err error) {
func (ts *TagCommonService) SetSiteWriteReservedTag(ctx context.Context, tags []string, userID string) (msg string, err error) {
err = ts.UpdateTag(ctx, tags, userID)
if err != nil {
return err
return err.Error(), err
}
err = ts.SetTagsAttribute(ctx, tags, "reserved", true)
if err != nil {
return err
return "", err
}
return nil
return "", nil
}
// SetTagsAttribute