Skip to content

Commit

Permalink
fix(params): use parentId in search params of import zip and h5p (#870)
Browse files Browse the repository at this point in the history
  • Loading branch information
ReidyT authored Aug 5, 2024
1 parent 34587c0 commit 7a491cc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,15 @@ export const buildClearMentionsRoute = () => `${ITEMS_ROUTE}/mentions`;
export const buildImportZipRoute = (parentId?: UUID) => {
const route = `${ITEMS_ROUTE}/zip-import`;
if (parentId) {
return `${route}?${new URLSearchParams({ id: parentId })}`;
return `${route}?${new URLSearchParams({ parentId })}`;
}
return route;
};
export const buildImportH5PRoute = (parentId?: UUID, previousItemId?: UUID) => {
const route = `${ITEMS_ROUTE}/h5p-import`;
const query = new URLSearchParams();
if (parentId) {
query.set('id', parentId);
query.set('parentId', parentId);
}
if (previousItemId) {
query.set('previousItemId', previousItemId);
Expand Down

0 comments on commit 7a491cc

Please sign in to comment.