update tag ParsedText

This commit is contained in:
aichy 2022-12-21 10:36:18 +08:00
parent 77274fd66c
commit 7f116809cc
2 changed files with 18 additions and 4 deletions

View File

@ -39,7 +39,21 @@ builds:
goos: goos:
- linux - linux
goarch: goarch:
- arm64 - arm64
- id: build-arm7
main: ./cmd/answer/.
binary: answer
ldflags: -s -w -X main.Version={{.Version}} -X main.Revision={{.ShortCommit}} -X main.Time={{.Date}} -X main.BuildUser=goreleaser
env:
- CC=arm-linux-gnueabihf-gcc
- CXX=arm-linux-gnueabihf-g++
- AR=arm-linux-gnueabihf-ar
goos:
- linux
goarch:
- arm
goarm:
- 7
- id: build-darwin-arm64 - id: build-darwin-arm64
main: ./cmd/answer/. main: ./cmd/answer/.
binary: answer binary: answer

View File

@ -320,13 +320,13 @@ func (ts *TagService) GetTagWithPage(ctx context.Context, req *schema.GetTagWith
resp := make([]*schema.GetTagPageResp, 0) resp := make([]*schema.GetTagPageResp, 0)
for _, tag := range tags { for _, tag := range tags {
excerpt := htmltext.FetchExcerpt(tag.ParsedText, "...", 240) //excerpt := htmltext.FetchExcerpt(tag.ParsedText, "...", 240)
resp = append(resp, &schema.GetTagPageResp{ resp = append(resp, &schema.GetTagPageResp{
TagID: tag.ID, TagID: tag.ID,
SlugName: tag.SlugName, SlugName: tag.SlugName,
DisplayName: tag.DisplayName, DisplayName: tag.DisplayName,
OriginalText: excerpt, OriginalText: tag.OriginalText,
ParsedText: excerpt, ParsedText: tag.ParsedText,
FollowCount: tag.FollowCount, FollowCount: tag.FollowCount,
QuestionCount: tag.QuestionCount, QuestionCount: tag.QuestionCount,
IsFollower: ts.checkTagIsFollow(ctx, req.UserID, tag.ID), IsFollower: ts.checkTagIsFollow(ctx, req.UserID, tag.ID),