Skip to content

Commit

Permalink
fix update redirect
Browse files Browse the repository at this point in the history
  • Loading branch information
kevincharles committed Mar 15, 2023
1 parent 463d8c9 commit 917d500
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/Api/updatePortfolioActivitySettings.php
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@
$response_arr = [
'success' => $success,
'message' => $message,
'portfolioCourseId' => $portfolioCourseId,
];

// set response code - 200 OK
Expand Down
4 changes: 2 additions & 2 deletions src/Tools/_framework/Paths/PortfolioActivitySettings.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ export async function action({ request, params }) {
let response = await axios.post("/api/updatePortfolioActivitySettings.php",{
...updates, doenetId:params.doenetId
})
// console.log("Create action!",updates,params.doenetId,response)
const portfolioCourseId = response.data.portfolioCourseId;

// if (response.ok) {
// // let { doenetId } = await response.json();

return redirect(`/portfolio/${params.doenetId}`)
return redirect(`/portfolio/${portfolioCourseId}`)
// }else{
// throw Error(response.message)
// }
Expand Down

0 comments on commit 917d500

Please sign in to comment.