From 26f3f4c03cf588f88d53e5288b3043ea6c721322 Mon Sep 17 00:00:00 2001 From: Fabian Stamm Date: Fri, 9 Mar 2018 14:24:18 +0100 Subject: [PATCH] Making makeRequest public --- index.d.ts | 2 +- index.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/index.d.ts b/index.d.ts index e9f6e37..1998adb 100644 --- a/index.d.ts +++ b/index.d.ts @@ -18,7 +18,7 @@ export default class SecureFile { private PrivateKey; constructor(server: string, username: string, private_key: string); private getCode(); - private makeRequest(endpoint, method, query, body?); + makeRequest(endpoint: string, method: "POST" | "GET" | "PUT" | "DELETE", query: any, body?: Buffer): Promise; test(): Promise<{ user: string; test: true; diff --git a/index.ts b/index.ts index 268e85e..5b35893 100644 --- a/index.ts +++ b/index.ts @@ -50,7 +50,7 @@ export default class SecureFile { return { code: code, signature: r.sign(code).toString("base64") }; } - private async makeRequest(endpoint: string, method: "POST" | "GET" | "PUT" | "DELETE", query: any, body?: Buffer) { + public async makeRequest(endpoint: string, method: "POST" | "GET" | "PUT" | "DELETE", query: any, body?: Buffer) { let code = await this.getCode(); query.code = code.code; query.signature = code.signature;