Skip to content

Commit

Permalink
fix: Fix for custom API actions - redirect to dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
JonaszJestem committed Jun 23, 2020
1 parent 9fb8b97 commit af5a308
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ const buildAuthenticatedRouter = (
} else {
// If the redirection is caused by API call to some action just redirect to resource
const [redirectTo] = req.originalUrl.split('/actions')
req.session.redirectTo = redirectTo
req.session.redirectTo = redirectTo.includes(`${rootPath}/api`) ? rootPath : redirectTo
req.session.save((err) => {
if (err) {
next(err)
Expand Down

0 comments on commit af5a308

Please sign in to comment.