fix: joining course error

This commit is contained in:
Rotimi Best
2024-07-10 21:53:34 +01:00
parent 98575e4dd9
commit fd5ec9209b
3 changed files with 19 additions and 7 deletions
@@ -11,15 +11,15 @@ export const load = async ({ params = { hash: '' } }) => {
const courseHashData = atob(decodeURIComponent(params.hash));
console.log('courseHashData', courseHashData);
const { groupId, name, description, orgSiteName } = JSON.parse(courseHashData);
const { id, name, description, orgSiteName } = JSON.parse(courseHashData);
if (!groupId || !name || !description || !orgSiteName) {
if (!id || !name || !description || !orgSiteName) {
throw 'Validation failed';
}
const currentOrg = await getCurrentOrg(orgSiteName, true);
return {
groupId,
id,
name,
description,
currentOrg