Add kick and file management features

- Implement kick functionality with add, remove, and check operations
- Add file management with create, request, and verify operations
- Update database schema with new tables and columns
- Enhance command handling in client module for new features
- Fix argument order in verify_password function
This commit is contained in:
Andrea Moro 2025-04-22 23:04:35 +02:00
parent 91b6942348
commit b8f2a91411
6 changed files with 436 additions and 10 deletions

View file

@ -0,0 +1,7 @@
CREATE TABLE IF NOT EXISTS kick (
id INTEGER PRIMARY KEY AUTOINCREMENT, -- Unique ID for each kick
user_name VARCHAR(255) NOT NULL -- ID of the user who made the kick
);
-- -- Create an index on the user_name column for faster lookups
CREATE INDEX IF NOT EXISTS idx_kick_user_name ON kick (user_name);

View file

@ -0,0 +1,8 @@
CREATE TABLE IF NOT EXISTS files (
id SERIAL PRIMARY KEY,
name VARCHAR(255) NOT NULL,
path VARCHAR(255) NOT NULL,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
CREATE INDEX IF NOT EXISTS idx_files_name ON files (name);

View file

@ -0,0 +1,2 @@
ALTER TABLE files
ADD COLUMN admin_verified BOOLEAN DEFAULT FALSE;