Skip to content

Commit e4d7fa6

Browse files
authored
Fixed giveCash and matched export types to documentation (#73)
* fix: server give cash * refactor: client types on exports
1 parent b726f51 commit e4d7fa6

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

src/client/cl_exports.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ exp('closeAtm', async () => {
1919
setAtmIsOpen(false);
2020
});
2121

22-
exp('giveNearestPlayerCash', (amount: string) => {
23-
giveCash(0, [amount]);
22+
exp('giveNearestPlayerCash', (amount: number) => {
23+
giveCash(0, [amount.toString()]);
2424
});
2525

26-
exp('createInvoiceForNearestPlayer', (amount: string, message: string) => {
27-
createInvoice(0, [amount, message]);
26+
exp('createInvoiceForNearestPlayer', (amount: number, message: string) => {
27+
createInvoice(0, [amount.toString(), message]);
2828
});
2929

3030
exp('depositMoney', (amount: number) => {

src/server/services/cash/cash.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export class CashService {
6161
throw new ServerError(BalanceErrors.InsufficentFunds);
6262
}
6363

64-
await this.handleAddCash(source, amount);
64+
await this.handleAddCash(req.data.source, amount);
6565
await this.handleRemoveCash(req.source, amount);
6666

6767
return true;

0 commit comments

Comments
 (0)