🏗️ update
This commit is contained in:
@@ -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)
|
||||
|
@@ -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 {
|
||||
|
@@ -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"),
|
||||
|
Reference in New Issue
Block a user