Skip to content

Commit

Permalink
BC-7954 - rename URL param roomName to parentId
Browse files Browse the repository at this point in the history
  • Loading branch information
bergatco committed Oct 10, 2024
1 parent 566b2c7 commit d36f7d0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/configuration/api/api.configuration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ export const API = {
FILE_UPLOAD: "/api/v3/file/upload/school/SCHOOLID/boardnodes/CONTEXTID",
FILE_DELETE: "/api/v3/file/delete/FILERECORD_ID",
FILE_RESTORE: "/api/v3/file/restore/FILERECORD_ID",
LOGIN_REDIRECT: "/login?redirect=/tldraw?roomName=ROOMID",
LOGIN_REDIRECT: "/login?redirect=/tldraw?parentId=ROOMID",
USER_DATA: `/api/v3/user/me`,
ENV_CONFIG: `/api/v3/config/public`,
};
2 changes: 1 addition & 1 deletion src/utils/connectionOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const getConnectionOptions = async (): Promise<{

const getParentId = () => {
const urlParams = new URLSearchParams(window.location.search);
const parentId = urlParams.get("roomName") ?? "";
const parentId = urlParams.get("parentId") ?? "";

validateId(parentId);

Expand Down
2 changes: 1 addition & 1 deletion src/utils/redirectUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const redirectToLoginPage = () => {
window.location.assign(redirectUrl);
} else {
window.location.assign(
`http://localhost:4000/login?redirect=tldraw?roomName=${parentId}`,
`http://localhost:4000/login?redirect=tldraw?parentId=${parentId}`,
);
}
};
Expand Down

0 comments on commit d36f7d0

Please sign in to comment.