Commit 880e2097 authored by Eva Bardou's avatar Eva Bardou
Browse files

Send pk to mutation

parent df21fa65
...@@ -115,7 +115,7 @@ export const actions = { ...@@ -115,7 +115,7 @@ export const actions = {
try { try {
const resp = await api.createContent(rootState.document.id, rootState.parts.pk, content) const resp = await api.createContent(rootState.document.id, rootState.parts.pk, content)
commit('lines/setTranscriptions', { pk: currentTransLine, transcription: resp.data }, {root: true}) commit('lines/setTranscriptions', { pk: currentTransLine, transcription: resp.data }, {root: true})
commit('lines/updateCurrentTrans', resp.data, {root: true}) commit('lines/updateCurrentTrans', resp.data.transcription, {root: true})
} catch (err) { } catch (err) {
console.log('couldnt create transcription!', err); console.log('couldnt create transcription!', err);
} }
...@@ -125,7 +125,7 @@ export const actions = { ...@@ -125,7 +125,7 @@ export const actions = {
try { try {
const resp = await api.updateContent(rootState.document.id, rootState.parts.pk, pk, content) const resp = await api.updateContent(rootState.document.id, rootState.parts.pk, pk, content)
commit('lines/setTranscriptions', { pk: currentTransLine, transcription: resp.data }, {root: true}) commit('lines/setTranscriptions', { pk: currentTransLine, transcription: resp.data }, {root: true})
commit('lines/updateCurrentTrans', resp.data, {root: true}) commit('lines/updateCurrentTrans', resp.data.transcription, {root: true})
} catch (err) { } catch (err) {
console.log('couldnt update transcription!', err); console.log('couldnt update transcription!', err);
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment