Update unit tests.

This commit is contained in:
kialam
2018-11-13 09:46:43 -05:00
parent f520be71d6
commit 44e9d3919d
4 changed files with 20 additions and 50 deletions

View File

@@ -40,15 +40,12 @@ class APIClient {
const data = `username=${un}&password=${pw}&next=${next}`;
const headers = { 'Content-Type': LOGIN_CONTENT_TYPE };
try {
await this.http.get(constant.API_LOGIN, { headers });
await this.http.post(constant.API_LOGIN, data, { headers });
} catch (err) {
alert(`There was a problem logging in: ${err}`);
}
await this.http.get(constant.API_LOGIN, { headers });
await this.http.post(constant.API_LOGIN, data, { headers });
}
BaseGet = (endpoint) => this.http.get(endpoint);
}
export default new APIClient();