mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-10 03:53:26 -08:00
[Server] Serve card-art rules and params through the database interface (#7850)
The four card-art commands still prepared their statements inline through Servatrice_DatabaseInterface: the two card_art_params updates in cmdSetCardArtParams, the rule upsert and delete, and the rule listing that mapped rows to protocol entries. Add CardArtRuleRecord, upsertCardArtRule, removeCardArtRule, getCardArtRules, setCardArtParams and clearCardArtParams to Server_DatabaseInterface with fail-closed defaults, implement them with the previous statements, and keep the validation, clamping, in-memory userInfo sync and broadcast in the handler.
This commit is contained in:
parent
2608228bdd
commit
1822d16a72
4 changed files with 140 additions and 38 deletions
|
|
@ -283,6 +283,15 @@ public:
|
|||
int clearBlacklistedBanners() override;
|
||||
bool getUserAdminFlags(const QString &userName, int &adminFlags) override;
|
||||
bool isCardArtAllowed(const QString &cardName, const QString &cardProviderId) override;
|
||||
bool upsertCardArtRule(const QString &cardName,
|
||||
const QString &cardProviderId,
|
||||
const QString &mode,
|
||||
const QString &reason,
|
||||
int createdBy) override;
|
||||
bool removeCardArtRule(const QString &cardName, const QString &cardProviderId) override;
|
||||
bool getCardArtRules(QList<CardArtRuleRecord> &rules) override;
|
||||
bool setCardArtParams(int userId, const QString ¶msJson) override;
|
||||
bool clearCardArtParams(int userId) override;
|
||||
bool addForgotPassword(const QString &user) override;
|
||||
bool removeForgotPassword(const QString &user) override;
|
||||
bool doesForgotPasswordExist(const QString &user) override;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue