Skip to content

Commit

Permalink
#109 frontend: adapt to current route configurations
Browse files Browse the repository at this point in the history
  • Loading branch information
Wolkenfarmer committed Mar 25, 2024
1 parent 63290e7 commit 6b70ecb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion frontend/src/components/widgets/LoginPatient.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"patientId": patientIdNumber,
}
fetch('https://localhost:8000/login/', {
fetch('http://localhost:8000/patient/access', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
Expand Down
12 changes: 8 additions & 4 deletions frontend/src/components/widgets/LoginTrainer.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script setup lang="ts">
import {ref} from 'vue'
import {useTrainerStore} from '@/stores/Trainer'
import {Modules, setModule, showErrorToast} from "@/App.vue"
import {Modules, setModule} from "@/App.vue"
import {svg} from "@/assets/Svg"
const usernameInput = ref("")
Expand All @@ -11,12 +11,16 @@
const trainerStore = useTrainerStore()
trainerStore.username = usernameInput.value
const requestBody = {
setModule(Modules.TRAINER)
return
// Will be used when trainer login is implemented in the backend
/*const requestBody = {
"username": usernameInput.value,
"password": passwordInput.value,
}
fetch('https://localhost:8000/login/', {
fetch('https://localhost:8000/trainer/login', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
Expand All @@ -41,7 +45,7 @@
.then(data => {
trainerStore.token = data.token
setModule(Modules.TRAINER)
})
})*/
}
</script>

Expand Down

0 comments on commit 6b70ecb

Please sign in to comment.