Adding code parser on getting code

This commit is contained in:
Fabian Stamm 2018-03-02 12:23:25 +01:00
parent 09d996d8bc
commit 88efc8c7fb
2 changed files with 2 additions and 0 deletions

View File

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

View File

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