mirror of
https://github.com/kikootwo/ReadMeABook.git
synced 2026-06-02 20:30:10 +00:00
Add notification system with admin UI and backend
Introduces a full notification system with support for Discord and Pushover backends, event triggers, and message formatting. Adds backend services, processors, and API endpoints for managing notifications, as well as a new Notifications tab in the admin settings UI. Updates documentation, database schema, and tests to cover notification features and approval workflow improvements. Also changes project license from MIT to AGPL v3.
This commit is contained in:
@@ -210,6 +210,7 @@ model Request {
|
||||
progress Int @default(0) // 0-100
|
||||
priority Int @default(0)
|
||||
errorMessage String? @map("error_message") @db.Text
|
||||
selectedTorrent Json? @map("selected_torrent") // Pre-selected torrent from interactive search (stored when awaiting approval)
|
||||
searchAttempts Int @default(0) @map("search_attempts")
|
||||
downloadAttempts Int @default(0) @map("download_attempts")
|
||||
importAttempts Int @default(0) @map("import_attempts")
|
||||
@@ -420,3 +421,17 @@ model BookDateSwipe {
|
||||
@@index([recommendationId])
|
||||
@@map("bookdate_swipes")
|
||||
}
|
||||
|
||||
model NotificationBackend {
|
||||
id String @id @default(uuid())
|
||||
type String // 'discord' | 'pushover' | 'email' | 'slack' | 'telegram' | 'webhook'
|
||||
name String // User-friendly label
|
||||
config Json // Type-specific config (encrypted sensitive values)
|
||||
events Json @default("[]") // Array of event strings
|
||||
enabled Boolean @default(true)
|
||||
createdAt DateTime @default(now()) @map("created_at")
|
||||
updatedAt DateTime @updatedAt @map("updated_at")
|
||||
|
||||
@@index([enabled])
|
||||
@@map("notification_backends")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user