This is an automated email from the ASF dual-hosted git repository.

linkinstar pushed a commit to branch feat/1.4.5/file
in repository https://gitbox.apache.org/repos/asf/answer.git


The following commit(s) were added to refs/heads/feat/1.4.5/file by this push:
     new 15a9be6e feat(question): add avatar field to question operator
15a9be6e is described below

commit 15a9be6e2fb2a815a46cdde4660ca777df06001b
Author: LinkinStars <[email protected]>
AuthorDate: Wed Feb 19 16:34:58 2025 +0800

    feat(question): add avatar field to question operator
---
 internal/schema/question_schema.go           | 1 +
 internal/service/question_common/question.go | 4 +++-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/internal/schema/question_schema.go 
b/internal/schema/question_schema.go
index 45de312e..94c26798 100644
--- a/internal/schema/question_schema.go
+++ b/internal/schema/question_schema.go
@@ -440,6 +440,7 @@ type QuestionPageRespOperator struct {
        Rank        int    `json:"rank"`
        DisplayName string `json:"display_name"`
        Status      string `json:"status"`
+       Avatar      string `json:"avatar"`
 }
 
 type AdminQuestionPageReq struct {
diff --git a/internal/service/question_common/question.go 
b/internal/service/question_common/question.go
index 866f0486..0ca1e616 100644
--- a/internal/service/question_common/question.go
+++ b/internal/service/question_common/question.go
@@ -23,11 +23,12 @@ import (
        "context"
        "encoding/json"
        "fmt"
-       "github.com/apache/answer/internal/service/siteinfo_common"
        "math"
        "strings"
        "time"
 
+       "github.com/apache/answer/internal/service/siteinfo_common"
+
        "github.com/apache/answer/internal/base/constant"
        "github.com/apache/answer/internal/base/data"
        "github.com/apache/answer/internal/base/handler"
@@ -456,6 +457,7 @@ func (qs *QuestionCommon) FormatQuestionsPage(
                                item.Operator.Username = userInfo.Username
                                item.Operator.Rank = userInfo.Rank
                                item.Operator.Status = userInfo.Status
+                               item.Operator.Avatar = userInfo.Avatar
                        }
                }
        }

Reply via email to