mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-10 20:13:24 -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
|
|
@ -139,8 +139,6 @@ protected:
|
|||
QMutex outputQueueMutex;
|
||||
|
||||
private:
|
||||
Servatrice_DatabaseInterface *sqlInterface;
|
||||
|
||||
Response::ResponseCode cmdAddToList(const Command_AddToList &cmd, ResponseContainer &rc);
|
||||
Response::ResponseCode cmdRemoveFromList(const Command_RemoveFromList &cmd, ResponseContainer &rc);
|
||||
Response::ResponseCode cmdGetPrivateChatHistory(const Command_GetPrivateChatHistory &cmd, ResponseContainer &rc);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue