Skip to content
Snippets Groups Projects
Commit ea7f6838 authored by robinwilliam.hundt's avatar robinwilliam.hundt
Browse files

fixed #122

sent wrong field name for token to /refresh-token/ endpoint
parent 3aeeda83
No related branches found
No related tags found
No related merge requests found
Pipeline #81001 passed
...@@ -46,7 +46,7 @@ export async function fetchJWT (credentials: Credentials): Promise<JSONWebToken> ...@@ -46,7 +46,7 @@ export async function fetchJWT (credentials: Credentials): Promise<JSONWebToken>
} }
export async function refreshJWT (oldToken: string): Promise<JSONWebToken> { export async function refreshJWT (oldToken: string): Promise<JSONWebToken> {
const token: string = (await ax.post('/api/refresh-token/', {oldToken})).data.token const token: string = (await ax.post('/api/refresh-token/', {token: oldToken})).data.token
ax.defaults.headers['Authorization'] = `JWT ${token}` ax.defaults.headers['Authorization'] = `JWT ${token}`
return {token} return {token}
} }
......
...@@ -34,6 +34,7 @@ export default { ...@@ -34,6 +34,7 @@ export default {
} }
}, },
methods: { methods: {
//TODO why the fuck would i do this?!?!
updateStudentData (fields = []) { updateStudentData (fields = []) {
this.$store.dispatch('getStudents', { this.$store.dispatch('getStudents', {
studentPks: Object.keys(this.$store.state.students), studentPks: Object.keys(this.$store.state.students),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment