mirror of
https://github.com/linux-do/new-api.git
synced 2025-11-05 13:53:42 +08:00
add log db
This commit is contained in:
5
main.go
5
main.go
@@ -42,6 +42,11 @@ func main() {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
common.FatalLog("failed to initialize database: " + err.Error())
|
common.FatalLog("failed to initialize database: " + err.Error())
|
||||||
}
|
}
|
||||||
|
// Initialize SQL Database
|
||||||
|
err = model.InitLogDB()
|
||||||
|
if err != nil {
|
||||||
|
common.FatalLog("failed to initialize database: " + err.Error())
|
||||||
|
}
|
||||||
defer func() {
|
defer func() {
|
||||||
err := model.CloseDB()
|
err := model.CloseDB()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user