Skip to content

Commit

Permalink
Demo Testing
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaTristanWereley committed Jun 24, 2024
1 parent 889d45f commit 3705906
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 13 deletions.
1 change: 0 additions & 1 deletion src/client/src/routes/admin/workspaces/+page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import axios from 'axios';

export async function load() {
try {

const url = 'http://localhost:3000/workspaces/organisation/667921611c557b42b92e53b6';

const response = await axios.get(url);
Expand Down
23 changes: 11 additions & 12 deletions src/client/src/routes/student/module/study/+page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,26 @@ import two from '$lib/files/study-notes-two.pdf';
import three from '$lib/files/study-notes-three.pdf';

export async function load() {

try{
try {
const url = 'http://localhost:3000/materials/workspace/1';

const response = await axios.get(url);

const mats = [];
for(let i =0 ; i<response.data.length;i++){

for (let i = 0; i < response.data.length; i++) {
const mat = {
title: response.data[i].title,
description:response.data[i].description,
link:response.data[i].file_path
}
mats.push(mat)
description: response.data[i].description,
link: response.data[i].file_path
};
mats.push(mat);
}

return {
materials: mats
}
}catch(error){
};
} catch (error) {
return {
materials: [
{
Expand Down

0 comments on commit 3705906

Please sign in to comment.