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 b2eb7689 feat(migrations): update site info initialization
b2eb7689 is described below

commit b2eb76893f982d201b638989bbe979ac8cf030a5
Author: LinkinStars <[email protected]>
AuthorDate: Wed Feb 19 16:56:36 2025 +0800

    feat(migrations): update site info initialization
---
 internal/migrations/init.go | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/internal/migrations/init.go b/internal/migrations/init.go
index a8e4b20e..c51d0b72 100644
--- a/internal/migrations/init.go
+++ b/internal/migrations/init.go
@@ -23,9 +23,10 @@ import (
        "context"
        "encoding/json"
        "fmt"
-       "github.com/apache/answer/internal/base/constant"
        "time"
 
+       "github.com/apache/answer/internal/base/constant"
+
        "github.com/apache/answer/internal/base/data"
        "github.com/apache/answer/internal/repo/unique"
        "github.com/apache/answer/internal/schema"
@@ -253,11 +254,12 @@ func (m *Mentor) initSiteInfoPrivilegeRank() {
 
 func (m *Mentor) initSiteInfoWrite() {
        writeData := map[string]interface{}{
-               "restrict_answer":       true,
-               "max_image_size":        4,
-               "max_attachment_size":   8,
-               "max_image_megapixel":   40,
-               "authorized_extensions": []string{"jpg", "jpeg", "png", "gif", 
"webp"},
+               "restrict_answer":                  true,
+               "max_image_size":                   4,
+               "max_attachment_size":              8,
+               "max_image_megapixel":              40,
+               "authorized_image_extensions":      []string{"jpg", "jpeg", 
"png", "gif", "webp"},
+               "authorized_attachment_extensions": make([]string, 0),
        }
        writeDataBytes, _ := json.Marshal(writeData)
        _, m.err = m.engine.Context(m.ctx).Insert(&entity.SiteInfo{

Reply via email to