From fcdbc5eecd40caedeb275b4eba2a6425a74ad271 Mon Sep 17 00:00:00 2001 From: KillerBossOriginal Date: Sat, 9 Dec 2023 21:12:43 +0100 Subject: [PATCH] 0.5.1 --- src/CreditsManager.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CreditsManager.ts b/src/CreditsManager.ts index 115705b..ebdd929 100644 --- a/src/CreditsManager.ts +++ b/src/CreditsManager.ts @@ -66,7 +66,7 @@ export default class CreditsManager { * @return {void} */ async pay(id: number, toPayID: number, amount: number) { - let req = await axios.post(`${this.URL}/credits/${id}`, { amount, to: toPayID }, { headers: { Authorization: `Bearer ${this.token}` } }); + let req = await axios.patch(`${this.URL}/credits/${id}`, { amount, to: toPayID }, { headers: { Authorization: `Bearer ${this.token}` } }); if (req.status == 403) throw new Error("No Permission"); if (req.status == 404) throw new Error("User not Found"); }