mirror of
https://github.com/fumiama/paper-manager.git
synced 2026-06-25 05:20:16 +08:00
add backend/file structs
This commit is contained in:
@@ -2,6 +2,7 @@ package global
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"os"
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
@@ -114,6 +115,18 @@ func init() {
|
||||
}, "系统")
|
||||
logrus.Warn("[user] 初次启动, 创建初始账户 fumiama 密码 123456")
|
||||
}
|
||||
err = UserDB.db.Close()
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
err = os.Chmod(UserDB.db.DBPath, 0600)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
err = UserDB.db.Open(time.Hour)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
|
||||
// User stores a user in table named UserTableUser
|
||||
|
||||
Reference in New Issue
Block a user