mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-10 03:53:26 -08:00
[Server] Serve deck storage listings through the database interface (#7851)
deckListHelper still prepared the folder and deck-file statements inline through Servatrice_DatabaseInterface, and the four deck commands reached checkSql, getUserIdInDB and getDeckFromDatabase through a concrete pointer. Add DeckListFolderRecord, DeckListFileRecord, getDeckListFolders and getDeckListFiles to Server_DatabaseInterface with fail-closed defaults, serve all four commands from the injected interface, and drop the sqlInterface member so the handler no longer holds a database implementation at all. Folder ordering, recursion order, public-only pruning and every response code are unchanged.
This commit is contained in:
parent
1822d16a72
commit
99bdcebf2e
5 changed files with 106 additions and 40 deletions
|
|
@ -124,6 +124,8 @@ public:
|
|||
const QSet<QString> &allSpectatorsEver,
|
||||
const QList<GameReplay *> &replayList) override;
|
||||
DeckList *getDeckFromDatabase(int deckId, int userId) override;
|
||||
bool getDeckListFolders(int folderId, int userId, QList<DeckListFolderRecord> &folders) override;
|
||||
bool getDeckListFiles(int folderId, int userId, QList<DeckListFileRecord> &files) override;
|
||||
|
||||
/**
|
||||
* @brief Creates a new temporary deck share bundle.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue