added initial display of IP ban editing (untested)

This commit is contained in:
2026-02-18 23:22:41 -07:00
parent 95221a8f40
commit b8f9c7378c
5 changed files with 355 additions and 14 deletions
+6 -1
View File
@@ -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()
}