Skip to content

Commit

Permalink
Clearing stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
wszeborowskimateusz committed Oct 28, 2020
1 parent 266e070 commit 896cfa4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
12 changes: 4 additions & 8 deletions src/store/globalDatabaseStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,10 @@ const actions = {
/* eslint-disable implicit-arrow-linebreak */
/* eslint-disable function-paren-newline */
saveSessionToGlobal({ dispatch }, sessionId) {
globalDatabaseService
.saveSessionToGlobal(sessionId)
.then(() => {
dispatch('parliamentManagement/loadSessions', null, { root: true });
})
.catch(() =>
toasts.errorToast(i18n.tc('common.somethingWentWrong')),
);
globalDatabaseService.saveSessionToGlobal(sessionId).then(
() => dispatch('parliamentManagement/loadSessions', null, { root: true }),
() => toasts.errorToast(i18n.tc('common.somethingWentWrong')),
);
},
};

Expand Down
4 changes: 2 additions & 2 deletions src/utils/requestSender.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export default {
const options = {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(body),
body: body != null ? JSON.stringify(body) : body,
};

return sendRequest(url, options);
Expand All @@ -108,7 +108,7 @@ export default {
const options = {
method: 'PUT',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(body),
body: body != null ? JSON.stringify(body) : body,
};

return sendRequest(url, options);
Expand Down

0 comments on commit 896cfa4

Please sign in to comment.