mirror of
https://github.com/mindoc-org/mindoc.git
synced 2025-11-24 08:47:04 +08:00
实现用户添加
This commit is contained in:
@@ -12,7 +12,7 @@ base_url = https://hook.iminho.me
|
||||
timezone = Asia/Shanghai
|
||||
|
||||
#数据库配置
|
||||
db_host=192.168.3.104
|
||||
db_host=127.0.0.1
|
||||
db_port=3306
|
||||
db_database=mindoc_db
|
||||
db_username=root
|
||||
|
||||
@@ -6,6 +6,10 @@ import "github.com/astaxie/beego"
|
||||
// 登录用户的Session名
|
||||
const LoginSessionName = "LoginSessionName"
|
||||
|
||||
const RegexpEmail = `^(\w)+(\.\w+)*@(\w)+((\.\w+)+)$`
|
||||
|
||||
const RegexpAccount = `^[a-zA-Z][a-zA-z0-9]{2,50}$`
|
||||
|
||||
// app_key
|
||||
func GetAppKey() (string) {
|
||||
return beego.AppConfig.DefaultString("app_key","go-git-webhook")
|
||||
@@ -13,4 +17,8 @@ func GetAppKey() (string) {
|
||||
|
||||
func GetDatabasePrefix() string {
|
||||
return beego.AppConfig.DefaultString("db_prefix","md_")
|
||||
}
|
||||
//获取默认头像
|
||||
func GetDefaultAvatar() string {
|
||||
return beego.AppConfig.DefaultString("avatar","/static/images/headimgurl.jpg")
|
||||
}
|
||||
Reference in New Issue
Block a user