Skip to content

Commit

Permalink
Merge pull request #212 from InseeFr/v2-develop
Browse files Browse the repository at this point in the history
V2 develop
  • Loading branch information
ORogel authored Jan 24, 2023
2 parents 9f35d9e + ad37d02 commit 97d9a9e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "stromae",
"version": "2.2.13",
"version": "2.2.14",
"description": "Web application for the management of questionnaires powered by Lunatic",
"repository": {
"type": "git",
Expand Down
20 changes: 12 additions & 8 deletions src/components/orchestrator/manager/orchestratorManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,18 @@ const OrchestratorManager = () => {
const [errorSending, setErrorSending] = useState(null);

const sendData = async (dataToSave) => {
const { data, stateData } = dataToSave;
const { /*status,*/ error: dataError } = await putData(data);
const { /*status,*/ error: stateDataError } = await putStateData(stateData);
const paradatas = LOGGER.getEventsToSend();
const { error: paradataPostError } = await postParadata(paradatas);
if (dataError || stateDataError || paradataPostError)
if (paradataPostError) setErrorSending('Error during sending');
LOGGER.clear();
if (!readonly) {
const { data, stateData } = dataToSave;
const { /*status,*/ error: dataError } = await putData(data);
const { /*status,*/ error: stateDataError } = await putStateData(
stateData
);
const paradatas = LOGGER.getEventsToSend();
const { error: paradataPostError } = await postParadata(paradatas);
if (dataError || stateDataError || paradataPostError)
if (paradataPostError) setErrorSending('Error during sending');
LOGGER.clear();
}
};

const logoutAndClose = () => {
Expand Down

0 comments on commit 97d9a9e

Please sign in to comment.