refact: modify db config
This commit is contained in:
@@ -3,6 +3,7 @@ package formula
|
||||
import (
|
||||
"net/http"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"gitea.com/bitwsd/document_ai/internal/model/formula"
|
||||
"gitea.com/bitwsd/document_ai/internal/service"
|
||||
@@ -46,7 +47,7 @@ func (endpoint *FormulaEndpoint) CreateTask(ctx *gin.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
fileExt := filepath.Ext(req.FileName)
|
||||
fileExt := strings.ToLower(filepath.Ext(req.FileName))
|
||||
if !utils.InArray(fileExt, []string{".jpg", ".jpeg", ".png", ".gif", ".bmp", ".tiff", ".webp"}) {
|
||||
ctx.JSON(http.StatusOK, common.ErrorResponse(ctx, common.CodeParamError, "Invalid file type"))
|
||||
return
|
||||
|
||||
@@ -4,16 +4,16 @@ server:
|
||||
|
||||
database:
|
||||
driver: mysql
|
||||
host: rm-bp1uh3e1qop18gz4wto.mysql.rds.aliyuncs.com
|
||||
port: 3306
|
||||
host: 172.31.134.12
|
||||
port: 3006
|
||||
username: root
|
||||
password: bitwsdttestESAadb12@3341
|
||||
password: yoge@coder%%%123321!
|
||||
dbname: doc_ai
|
||||
max_idle: 10
|
||||
max_open: 100
|
||||
max_open: 30
|
||||
|
||||
redis:
|
||||
addr: 172.31.32.138:6379
|
||||
addr: 172.31.134.12:6399
|
||||
password: bitwsd@8912WE!
|
||||
db: 0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user