mirror of
https://github.com/simon-ding/polaris.git
synced 2026-06-09 19:47:47 +08:00
feat: remove blacklist api
This commit is contained in:
3
db/db.go
3
db/db.go
@@ -756,4 +756,7 @@ func (c *client) AddTorrent2Blacklist(hash, name string, mediaId int) error {
|
||||
|
||||
func (c *client) GetTorrentBlacklist() (ent.Blacklists, error) {
|
||||
return c.ent.Blacklist.Query().Where(blacklist.TypeEQ(blacklist.TypeTorrent)).All(context.Background())
|
||||
}
|
||||
func (c *client) DeleteTorrentBlacklist(id int) error {
|
||||
return c.ent.Blacklist.DeleteOneID(id).Exec(context.Background())
|
||||
}
|
||||
@@ -42,6 +42,7 @@ type Database interface {
|
||||
|
||||
AddTorrent2Blacklist(hash, name string, mediaId int) error
|
||||
GetTorrentBlacklist() (ent.Blacklists, error)
|
||||
DeleteTorrentBlacklist(id int) error
|
||||
}
|
||||
|
||||
type Settings interface {
|
||||
|
||||
Reference in New Issue
Block a user