Skip to content

Commit

Permalink
Merge pull request #4155 from greenbone/fix-CI-step--upload-coverage
Browse files Browse the repository at this point in the history
fix-CI-step--upload-coverage
  • Loading branch information
a-h-abdelsalam authored Sep 10, 2024
2 parents e12c5c7 + 01d912d commit 0c4c5a5
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/web/store/usersettings/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,14 @@ export const setIsLoggedIn = isLoggedIn => ({
isLoggedIn: isLoggedIn === true,
});

export const renewSessionTimeout = gmp => () => dispatch =>
gmp.user
.renewSession()
.then(response => dispatch(setSessionTimeout(response.data)));

export const renewSessionTimeout = gmp => () => async dispatch => {
try {
const response = await gmp.user.renewSession();
dispatch(setSessionTimeout(response.data));
} catch (error) {
console.error('Error renewing session:', error);
}
};
export const updateTimezone = gmp => timezone => dispatch => {
gmp.setTimezone(timezone);
return Promise.resolve(dispatch(setTimezone(timezone)));
Expand Down

0 comments on commit 0c4c5a5

Please sign in to comment.