Making makeRequest public

This commit is contained in:
Fabian Stamm 2018-03-09 14:24:18 +01:00
parent 33353e3136
commit 26f3f4c03c
2 changed files with 2 additions and 2 deletions

2
index.d.ts vendored
View File

@ -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<Response>;
test(): Promise<{
user: string;
test: true;

View File

@ -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;