From c7d16a00e6a262c90c552a67e3919cfe44bcaf49 Mon Sep 17 00:00:00 2001 From: Hykilpikonna Date: Sat, 7 Sep 2019 08:28:24 -0400 Subject: [PATCH] [+] Send username and password to api in body --- src/components/login/login.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/login/login.ts b/src/components/login/login.ts index 095b540..da99423 100644 --- a/src/components/login/login.ts +++ b/src/components/login/login.ts @@ -24,7 +24,9 @@ export default class Login extends Vue this.loading = true; // Fetch request TODO: Add username and password when the https server is ready. - fetch(`${Constants.API_URL}/veracross/courses`).then(res => + fetch(`${Constants.API_URL}/api/login`, + {body: JSON.stringify({username: this.username, password: this.password})}) + .then(res => { // Get response body text res.text().then(text =>