mirror of
https://github.com/JonnyBro/JaBa.git
synced 2024-11-22 05:04:58 +05:00
fix checkjar getting wrong jar
This commit is contained in:
parent
7811127db6
commit
4af141772a
1 changed files with 3 additions and 3 deletions
|
@ -42,15 +42,15 @@ class Checkjar extends BaseCommand {
|
|||
const clientInfo = await fetch("https://api.monobank.ua/personal/client-info", {
|
||||
method: "GET",
|
||||
headers: {
|
||||
"X-Token": client.config.apiKeys.monobankApiKey,
|
||||
"X-Token": client.config.apiKeys.monobank.key,
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
}).then(res => res.json());
|
||||
const jar = clientInfo.jars[1];
|
||||
const jar = clientInfo.jars.find(j => j.id === client.config.apiKeys.monobank.jar);
|
||||
const jarTransactions = await fetch(`https://api.monobank.ua/personal/statement/${jar.id}/${Date.now() - 7 * 24 * 60 * 60 * 1000}/${Date.now()}`, {
|
||||
method: "GET",
|
||||
headers: {
|
||||
"X-Token": client.config.apiKeys.monobankApiKey,
|
||||
"X-Token": client.config.apiKeys.monobank.key,
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
}).then(res => res.json());
|
||||
|
|
Loading…
Reference in a new issue