Added logs

This commit is contained in:
Jonathan Barrow 2022-09-11 15:03:40 -04:00
parent 6ca793e2a7
commit 874e8d9f38
No known key found for this signature in database
GPG Key ID: E86E9FE9049C741F
3 changed files with 9 additions and 0 deletions

View File

@ -5,6 +5,7 @@ import (
"os"
"time"
"github.com/PretendoNetwork/friends-secure/globals"
"go.mongodb.org/mongo-driver/mongo"
"go.mongodb.org/mongo-driver/mongo/options"
)
@ -21,4 +22,6 @@ func connectMongo() {
mongoDatabase = mongoClient.Database("pretendo")
MongoCollection = mongoDatabase.Collection("pnids")
globals.Logger.Success("Connected to Mongo!")
}

View File

@ -19,6 +19,8 @@ func connectPostgres() {
globals.Logger.Critical(err.Error())
}
globals.Logger.Success("Connected to Postgres!")
initPostgresWiiU()
// TODO: 3DS database
}

View File

@ -11,6 +11,8 @@ func initPostgresWiiU() {
return
}
globals.Logger.Success("[Wii U] Postgres schema created")
_, err = Postgres.Exec(`CREATE TABLE IF NOT EXISTS wiiu.user_data (
pid integer PRIMARY KEY,
show_online boolean,
@ -62,4 +64,6 @@ func initPostgresWiiU() {
globals.Logger.Critical(err.Error())
return
}
globals.Logger.Success("[Wii U] Postgres tables created")
}