forked from hibas123/SecureFileWrapper
Adding code parser on getting code
This commit is contained in:
parent
09d996d8bc
commit
88efc8c7fb
1
index.js
1
index.js
@ -17,6 +17,7 @@ class SecureFile {
|
||||
}
|
||||
async getCode() {
|
||||
let code_res = await fetch(this.Server + "/code?username=" + this.Username);
|
||||
statusParser(code_res);
|
||||
//ToDo check status Codes
|
||||
let code = (await code_res.json()).code;
|
||||
let r = new rsa(this.PrivateKey, "pkcs1-pem");
|
||||
|
1
index.ts
1
index.ts
@ -34,6 +34,7 @@ export default class SecureFile {
|
||||
|
||||
private async getCode() {
|
||||
let code_res = await fetch(this.Server + "/code?username=" + this.Username);
|
||||
statusParser(code_res);
|
||||
//ToDo check status Codes
|
||||
let code = (await code_res.json()).code;
|
||||
let r = new rsa(this.PrivateKey, "pkcs1-pem");
|
||||
|
Loading…
Reference in New Issue
Block a user