add go-captcha / add base auth api

This commit is contained in:
landaiqing
2024-08-06 00:08:33 +08:00
parent 9b36d2fff0
commit d0496b34f0
29 changed files with 687 additions and 121 deletions

View File

@@ -26,19 +26,22 @@ func MySQlConnect() *gorm.DB {
mysqlLogger = logger.New(
log.New(os.Stdout, "\r\n", log.LstdFlags),
logger.Config{
SlowThreshold: time.Second, //慢sql日志
LogLevel: logger.Info, //级别
Colorful: true, //颜色
SlowThreshold: time.Second, //慢sql日志
LogLevel: logger.Info, //级别
Colorful: true, //颜色
IgnoreRecordNotFoundError: true, //忽略RecordNotFoundError
ParameterizedQueries: true, //格式化SQL语句
})
} else {
mysqlLogger = logger.New(
log.New(os.Stdout, "\r\n", log.LstdFlags),
logger.Config{
SlowThreshold: time.Second, //慢sql日志
LogLevel: logger.Error, //级别
Colorful: true, //颜色
SlowThreshold: time.Second, //慢sql日志
LogLevel: logger.Error, //级别
Colorful: true, //颜色
IgnoreRecordNotFoundError: true, //忽略RecordNotFoundError
ParameterizedQueries: true, //格式化SQL语句
})
}