1
0
mirror of https://git.ngram.ca/OpenJam/rc-servers synced 2026-08-23 23:08:52 +00:00

Add basic currency support and plumb multiplayer rewards screen #70

This commit is contained in:
NG (Graham)
2025-12-28 18:13:14 -05:00
parent 5e05cbdb59
commit 4ec64a9cd9
26 changed files with 802 additions and 48 deletions

View File

@@ -33,4 +33,11 @@ impl super::CommonUser for UserData {
async fn db_metrics(&self) -> oj_rc_database::DatabaseMetrics {
self.db.metrics().await
}
async fn currency(&self, ty: super::CurrencyType, op: super::CurrencyOp) -> Result<u64, polariton_server::operations::SimpleOpError> {
self.currency_op(ty, op).await.map_err(|e| polariton_server::operations::SimpleOpError::with_message(
crate::data::error_codes::WebServicesError::DatabaseError as i16,
format!("Currency operation failed for user {}: {}", self.account.id, e),
))
}
}