Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Kedrihan committed Jul 12, 2024
1 parent 1f2b8f6 commit b7c9608
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
9 changes: 1 addition & 8 deletions resources/[soz]/soz-phone/src/server/bank/bank.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,4 @@ onNetPromise<string, BankTransaction[]>(BankEvents.FIVEM_EVENT_FETCH_TRANSACTION
bankLogger.error(`Error occured in fetch transactions event (${reqObj.source}), Error: ${e.message}`);
resp({ status: 'error', errorMsg: 'UNKNOWN_ERROR' });
});
});

/*onNetPromise<BankTransaction, void>(BankEvents.FIVEM_EVENT_TRANSACTION_CREATED, (reqObj, resp) => {
BankService.handleNewTransaction(reqObj, resp).catch((e) => {
bankLogger.error(`Error occured in new transaction event (${reqObj.source}), Error: ${e.message}`);
resp({ status: 'error', errorMsg: 'UNKNOWN_ERROR' });
});
});*/
});
3 changes: 1 addition & 2 deletions resources/[soz]/soz-phone/src/server/bank/bank.db.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,14 @@ import { BankTransaction } from '../../../typings/app/bank';

export class _BankTransactionDB {
async getTransactions(account: string): Promise<BankTransaction[]> {
var transactions = await exports.oxmysql.query_async(
return await exports.oxmysql.query_async(
`SELECT emitterAccount, emitterName, targetAccount, targetName, amount, unix_timestamp(date)*1000 as date
FROM bank_transactions
WHERE date > date_sub(now(), interval 7 day)
AND (targetAccount = ? OR emitterAccount = ?)
AND targetAccount <> emitterAccount`,
[account, account],
);
return transactions;
}
}

Expand Down

0 comments on commit b7c9608

Please sign in to comment.