added initial display of IP ban editing (untested)
This commit is contained in:
+6
-1
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Amsterdam Web Communities System
|
||||
* Copyright (c) 2025 Erbosoft Metaverse Design Solutions, All Rights Reserved
|
||||
* Copyright (c) 2025-2026 Erbosoft Metaverse Design Solutions, All Rights Reserved
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
@@ -21,12 +21,17 @@ var amdb *sqlx.DB
|
||||
// SetupDb sets up the database and associated items.
|
||||
func SetupDb() (func(), error) {
|
||||
var fn1 func() = nil
|
||||
var fn2 func() = nil
|
||||
db, err := sqlx.Open(config.GlobalConfig.Database.Driver, config.GlobalConfig.Database.Dsn)
|
||||
if err == nil {
|
||||
amdb = db
|
||||
fn1 = setupAuditWriter()
|
||||
fn2 = setupIPBanSweep()
|
||||
}
|
||||
return func() {
|
||||
if fn2 != nil {
|
||||
fn2()
|
||||
}
|
||||
if fn1 != nil {
|
||||
fn1()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user