Make kromer storage type "real" to allow buying cents/pennies

This commit is contained in:
Celestora 2021-11-03 19:19:15 +02:00
parent fd09cc61f8
commit e5ea1cd351
2 changed files with 3 additions and 2 deletions

View file

@ -219,10 +219,10 @@ class User extends RowModel
return $this->getRecord()->type;
}
function getCoins(): int
function getCoins(): float
{
if(!OPENVK_ROOT_CONF["openvk"]["preferences"]["commerce"])
return 0;
return 0.0;
return $this->getRecord()->coins;
}

View file

@ -0,0 +1 @@
ALTER TABLE `profiles` CHANGE `coins` `coins` REAL(20) UNSIGNED NOT NULL DEFAULT '0';