Update profanity-filter.js
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
parent
6be1dc4667
commit
4fdaa4f7da
1 changed files with 1 additions and 22 deletions
|
@ -129,28 +129,7 @@ class ProfanityFilter {
|
|||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialize the database table for custom profanity words (legacy sync version)
|
||||
* @deprecated Use initializeDatabaseAsync() instead
|
||||
*/
|
||||
initializeDatabase() {
|
||||
this.db.serialize(() => {
|
||||
this.db.run(`CREATE TABLE IF NOT EXISTS profanity_words (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
word TEXT NOT NULL UNIQUE,
|
||||
severity TEXT DEFAULT 'medium',
|
||||
category TEXT DEFAULT 'custom',
|
||||
created_at DATETIME DEFAULT CURRENT_TIMESTAMP,
|
||||
created_by TEXT DEFAULT 'admin'
|
||||
)`, (err) => {
|
||||
if (err) {
|
||||
console.error('Error creating profanity_words table:', err);
|
||||
} else {
|
||||
console.log('Profanity words table initialized successfully');
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
// Removed the deprecated initializeDatabase method as it is unused and no longer necessary.
|
||||
|
||||
/**
|
||||
* Load custom words from database
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue