🏗️ update

This commit is contained in:
2024-12-24 18:01:54 +08:00
parent 89d64336f5
commit e31f95b943
168 changed files with 1337 additions and 14789 deletions

View File

@@ -20,7 +20,7 @@ func NewCasbin(engine *gorm.DB) *casbin.SyncedCachedEnforcer {
if err != nil {
panic(err)
}
path := filepath.Join(cwd, "etc", "rbac_model.conf")
path := filepath.Join(cwd, "/api/etc", "rbac_model.conf")
modelFile, err := model.NewModelFromFile(path)
if err != nil {
panic(err)

View File

@@ -1,10 +1,10 @@
package ip2region
import (
"fmt"
"github.com/lionsoul2014/ip2region/binding/golang/xdb"
"os"
"path/filepath"
"github.com/lionsoul2014/ip2region/binding/golang/xdb"
)
// NewIP2Region creates a new IP2Region searcher instance.
@@ -13,6 +13,7 @@ func NewIP2Region() *xdb.Searcher {
if err != nil {
panic(err)
}
fmt.Println(cwd)
dbPath := filepath.Join(cwd, "resources/ip2region", "ip2region.xdb")
cBuff, err := xdb.LoadContentFromFile(dbPath)
if err != nil {

View File

@@ -16,7 +16,9 @@ func NewWechatPublic(appId, appSecret, token, aesKey, addr, pass string, db int)
AESKey: aesKey,
Log: officialAccount.Log{
Level: "error",
ENV: "production",
File: "./logs/wechat/wechat_official.log",
Error: "./logs/wechat/wechat_official_error.log",
Stdout: false,
},
ResponseType: os.Getenv("response_type"),