Skip to content

Commit 2d13211

Browse files
committed
Merge branch 'feat/1.4.5/file' into test
2 parents 607f1d7 + b2eb768 commit 2d13211

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

internal/migrations/init.go

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,10 @@ import (
2323
"context"
2424
"encoding/json"
2525
"fmt"
26-
"github.com/apache/answer/internal/base/constant"
2726
"time"
2827

28+
"github.com/apache/answer/internal/base/constant"
29+
2930
"github.com/apache/answer/internal/base/data"
3031
"github.com/apache/answer/internal/repo/unique"
3132
"github.com/apache/answer/internal/schema"
@@ -253,11 +254,12 @@ func (m *Mentor) initSiteInfoPrivilegeRank() {
253254

254255
func (m *Mentor) initSiteInfoWrite() {
255256
writeData := map[string]interface{}{
256-
"restrict_answer": true,
257-
"max_image_size": 4,
258-
"max_attachment_size": 8,
259-
"max_image_megapixel": 40,
260-
"authorized_extensions": []string{"jpg", "jpeg", "png", "gif", "webp"},
257+
"restrict_answer": true,
258+
"max_image_size": 4,
259+
"max_attachment_size": 8,
260+
"max_image_megapixel": 40,
261+
"authorized_image_extensions": []string{"jpg", "jpeg", "png", "gif", "webp"},
262+
"authorized_attachment_extensions": make([]string, 0),
261263
}
262264
writeDataBytes, _ := json.Marshal(writeData)
263265
_, m.err = m.engine.Context(m.ctx).Insert(&entity.SiteInfo{

0 commit comments

Comments
 (0)