From 880e20977eaf026cdfd1eea820550b6851a5c991 Mon Sep 17 00:00:00 2001 From: Eva Bardou <ebardou@teklia.com> Date: Fri, 19 Feb 2021 16:20:16 +0100 Subject: [PATCH] Send pk to mutation --- front/src/editor/store/transcriptions.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/front/src/editor/store/transcriptions.js b/front/src/editor/store/transcriptions.js index 6004741b..a5aeaaa8 100644 --- a/front/src/editor/store/transcriptions.js +++ b/front/src/editor/store/transcriptions.js @@ -115,7 +115,7 @@ export const actions = { try { const resp = await api.createContent(rootState.document.id, rootState.parts.pk, content) 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) { console.log('couldnt create transcription!', err); } @@ -125,7 +125,7 @@ export const actions = { try { 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/updateCurrentTrans', resp.data, {root: true}) + commit('lines/updateCurrentTrans', resp.data.transcription, {root: true}) } catch (err) { console.log('couldnt update transcription!', err); } -- GitLab