diff --git a/client/src/ScreenRecorder.jsx b/client/src/ScreenRecorder.jsx index f651e8da..36c87788 100644 --- a/client/src/ScreenRecorder.jsx +++ b/client/src/ScreenRecorder.jsx @@ -1,6 +1,7 @@ import React, { useState, useEffect } from "react"; import { ReactMediaRecorder, useReactMediaRecorder } from "react-media-recorder"; import { addVideo } from "./Utils/requests"; +import { getMe } from "./Utils/requests"; const ScreenRecorder = ({ onRecordingComplete }) => { const { diff --git a/client/src/ScreenRecorderWithChunks.jsx b/client/src/ScreenRecorderWithChunks.jsx index 534161bc..981f8175 100644 --- a/client/src/ScreenRecorderWithChunks.jsx +++ b/client/src/ScreenRecorderWithChunks.jsx @@ -1,6 +1,7 @@ import React, { useEffect, useState } from 'react'; import { addVideo } from './Utils/requests'; import { server } from './Utils/hosts'; +import { getMe } from './Utils/requests'; const ScreenRecorderWithChunks = () => { const [mediaRecorder, setMediaRecorder] = useState(null); @@ -67,7 +68,9 @@ const ScreenRecorderWithChunks = () => { //console.log(blob) //console.log(formattedDate); - formData.append('files', blob, `${localStorage.studentName} at ${formattedDate}.mp4`); + const thisStudent = await getMe(); + console.log(thisStudent) + formData.append('files', blob, `${thisStudent.data['students'][0]['name']} at ${formattedDate}.mp4`); //console.log(formData) try { @@ -78,7 +81,8 @@ const ScreenRecorderWithChunks = () => { const result = await response.json(); //console.log("Upload successful:", result); - addVideo(parseInt(localStorage.studentID), result[0]); + + addVideo(parseInt(thisStudent.data['students'][0]['id']), result[0]); } catch (error) { console.error("Error uploading the recording:", error); } @@ -123,18 +127,18 @@ const ScreenRecorderWithChunks = () => { return () => clearInterval(intervalId); // Cleanup on component unmount }, [isRecording]); - useEffect(() => { - setTimeout(() => { - setTimerD(parseInt(timerd) + 1) + //useEffect(() => { + //setTimeout(() => { + //setTimerD(parseInt(timerd) + 1) //console.log('howdy') //console.log(isRecording) - if (localStorage.isRecording == 'false' && timerd != 0) { - console.log('false') - window.location.reload() - } - }, 10000) - }, [timerd]) + // if (localStorage.isRecording == 'false' && timerd != 0) { + // console.log('false') + // window.location.reload() + // } + // }, 10000) + //}, [timerd]) return (
); diff --git a/client/src/Utils/requests.js b/client/src/Utils/requests.js index b6015114..b48ead51 100644 --- a/client/src/Utils/requests.js +++ b/client/src/Utils/requests.js @@ -787,4 +787,11 @@ export const getSchoolList = async() => video: video } }); - \ No newline at end of file + + + export const getMe = async() => + makeRequest({ + method: GET, + path: `${server}/students/me`, + auth: true, + }); \ No newline at end of file diff --git a/server/config/database.js b/server/config/database.js index 137984ed..c17d3580 100644 --- a/server/config/database.js +++ b/server/config/database.js @@ -29,7 +29,7 @@ module.exports = ({ env }) => ({ username: env('DATABASE_USERNAME', 'postgres'), password: env('DATABASE_PASSWORD', 'postgres'), schema: 'public', - ssl: {rejectUnauthorized: false} + ssl: {rejectUnauthorized: false}, }, options: { 'pool': { diff --git a/server/config/middleware.js b/server/config/middleware.js index f4453470..093f49b2 100644 --- a/server/config/middleware.js +++ b/server/config/middleware.js @@ -22,17 +22,18 @@ module.exports = { options: { br: false } - } + }, // logger: { // // dev + prod // level: debug + info, // requests: true + false // } - // dev - // cors: { - // enabled: true, - // origin: ['http://localhost:3000', 'http://localhost:1337'] - // }, + dev : { + cors: { + enabled: true, + origin: ['http://localhost:3000', 'http://localhost:1337'] + } + }, }, } \ No newline at end of file diff --git a/server/extensions/documentation/documentation/1.0.0/full_documentation.json b/server/extensions/documentation/documentation/1.0.0/full_documentation.json index 68c181ba..aac6e782 100755 --- a/server/extensions/documentation/documentation/1.0.0/full_documentation.json +++ b/server/extensions/documentation/documentation/1.0.0/full_documentation.json @@ -14,7 +14,7 @@ "name": "Apache 2.0", "url": "https://www.apache.org/licenses/LICENSE-2.0.html" }, - "x-generation-date": "10/23/2024 10:40:54 PM" + "x-generation-date": "11/05/2024 8:24:49 PM" }, "x-strapi-config": { "path": "/documentation", diff --git a/server/public/uploads/2024_1_53_36_PM_1ef73a2e9b.mp4 b/server/public/uploads/2024_1_53_36_PM_1ef73a2e9b.mp4 new file mode 100644 index 00000000..bf1e7469 Binary files /dev/null and b/server/public/uploads/2024_1_53_36_PM_1ef73a2e9b.mp4 differ diff --git a/server/public/uploads/2024_1_54_39_PM_af71f92b10.mp4 b/server/public/uploads/2024_1_54_39_PM_af71f92b10.mp4 new file mode 100644 index 00000000..c9be0ea2 Binary files /dev/null and b/server/public/uploads/2024_1_54_39_PM_af71f92b10.mp4 differ diff --git a/server/public/uploads/2024_1_55_42_PM_bd99e5f6af.mp4 b/server/public/uploads/2024_1_55_42_PM_bd99e5f6af.mp4 new file mode 100644 index 00000000..48929a9a Binary files /dev/null and b/server/public/uploads/2024_1_55_42_PM_bd99e5f6af.mp4 differ diff --git a/server/public/uploads/2024_1_56_45_PM_33e519e62e.mp4 b/server/public/uploads/2024_1_56_45_PM_33e519e62e.mp4 new file mode 100644 index 00000000..aa0b114c Binary files /dev/null and b/server/public/uploads/2024_1_56_45_PM_33e519e62e.mp4 differ diff --git a/server/public/uploads/2024_1_57_48_PM_11691f1f31.mp4 b/server/public/uploads/2024_1_57_48_PM_11691f1f31.mp4 new file mode 100644 index 00000000..57e22c0c Binary files /dev/null and b/server/public/uploads/2024_1_57_48_PM_11691f1f31.mp4 differ diff --git a/server/public/uploads/2024_1_58_51_PM_657a061f00.mp4 b/server/public/uploads/2024_1_58_51_PM_657a061f00.mp4 new file mode 100644 index 00000000..fc9881c4 Binary files /dev/null and b/server/public/uploads/2024_1_58_51_PM_657a061f00.mp4 differ diff --git a/server/public/uploads/2024_1_59_32_PM_6e245a1323.mp4 b/server/public/uploads/2024_1_59_32_PM_6e245a1323.mp4 new file mode 100644 index 00000000..03867d4d Binary files /dev/null and b/server/public/uploads/2024_1_59_32_PM_6e245a1323.mp4 differ diff --git a/server/public/uploads/2024_2_16_21_PM_5552d8851b.mp4 b/server/public/uploads/2024_2_16_21_PM_5552d8851b.mp4 new file mode 100644 index 00000000..c4d76c21 Binary files /dev/null and b/server/public/uploads/2024_2_16_21_PM_5552d8851b.mp4 differ diff --git a/server/public/uploads/2024_2_17_22_PM_c4f95d62d3.mp4 b/server/public/uploads/2024_2_17_22_PM_c4f95d62d3.mp4 new file mode 100644 index 00000000..2f94488b Binary files /dev/null and b/server/public/uploads/2024_2_17_22_PM_c4f95d62d3.mp4 differ diff --git a/server/public/uploads/2024_2_18_25_PM_2324e20ba4.mp4 b/server/public/uploads/2024_2_18_25_PM_2324e20ba4.mp4 new file mode 100644 index 00000000..ff729151 Binary files /dev/null and b/server/public/uploads/2024_2_18_25_PM_2324e20ba4.mp4 differ diff --git a/server/public/uploads/2024_2_19_28_PM_5b264478cb.mp4 b/server/public/uploads/2024_2_19_28_PM_5b264478cb.mp4 new file mode 100644 index 00000000..27535841 Binary files /dev/null and b/server/public/uploads/2024_2_19_28_PM_5b264478cb.mp4 differ diff --git a/server/public/uploads/2024_2_20_31_PM_ae5800f4ff.mp4 b/server/public/uploads/2024_2_20_31_PM_ae5800f4ff.mp4 new file mode 100644 index 00000000..fec8d9ae Binary files /dev/null and b/server/public/uploads/2024_2_20_31_PM_ae5800f4ff.mp4 differ diff --git a/server/public/uploads/2024_2_21_33_PM_a191999f93.mp4 b/server/public/uploads/2024_2_21_33_PM_a191999f93.mp4 new file mode 100644 index 00000000..254f827a Binary files /dev/null and b/server/public/uploads/2024_2_21_33_PM_a191999f93.mp4 differ diff --git a/server/public/uploads/2024_2_22_35_PM_cfb1a6a039.mp4 b/server/public/uploads/2024_2_22_35_PM_cfb1a6a039.mp4 new file mode 100644 index 00000000..5dd8b713 Binary files /dev/null and b/server/public/uploads/2024_2_22_35_PM_cfb1a6a039.mp4 differ diff --git a/server/public/uploads/2024_2_23_03_PM_ff1389a2e0.mp4 b/server/public/uploads/2024_2_23_03_PM_ff1389a2e0.mp4 new file mode 100644 index 00000000..76af3d07 Binary files /dev/null and b/server/public/uploads/2024_2_23_03_PM_ff1389a2e0.mp4 differ diff --git a/server/public/uploads/2024_2_26_10_PM_e6c8b71e25.mp4 b/server/public/uploads/2024_2_26_10_PM_e6c8b71e25.mp4 new file mode 100644 index 00000000..8a22224f Binary files /dev/null and b/server/public/uploads/2024_2_26_10_PM_e6c8b71e25.mp4 differ diff --git a/server/public/uploads/2024_2_27_13_PM_26e011c96f.mp4 b/server/public/uploads/2024_2_27_13_PM_26e011c96f.mp4 new file mode 100644 index 00000000..7fdb4d47 Binary files /dev/null and b/server/public/uploads/2024_2_27_13_PM_26e011c96f.mp4 differ diff --git a/server/public/uploads/2024_2_28_56_PM_10ad37c7a8.mp4 b/server/public/uploads/2024_2_28_56_PM_10ad37c7a8.mp4 new file mode 100644 index 00000000..a51f0209 Binary files /dev/null and b/server/public/uploads/2024_2_28_56_PM_10ad37c7a8.mp4 differ diff --git a/server/public/uploads/2024_2_29_58_PM_50b378593c.mp4 b/server/public/uploads/2024_2_29_58_PM_50b378593c.mp4 new file mode 100644 index 00000000..83b88485 Binary files /dev/null and b/server/public/uploads/2024_2_29_58_PM_50b378593c.mp4 differ diff --git a/server/public/uploads/2024_2_31_00_PM_b6eb632a98.mp4 b/server/public/uploads/2024_2_31_00_PM_b6eb632a98.mp4 new file mode 100644 index 00000000..63ca2cf5 Binary files /dev/null and b/server/public/uploads/2024_2_31_00_PM_b6eb632a98.mp4 differ diff --git a/server/public/uploads/2024_2_33_41_PM_6130bee334.mp4 b/server/public/uploads/2024_2_33_41_PM_6130bee334.mp4 new file mode 100644 index 00000000..f53e8510 Binary files /dev/null and b/server/public/uploads/2024_2_33_41_PM_6130bee334.mp4 differ diff --git a/server/public/uploads/2024_2_34_44_PM_fa006e23b5.mp4 b/server/public/uploads/2024_2_34_44_PM_fa006e23b5.mp4 new file mode 100644 index 00000000..a4f8a239 Binary files /dev/null and b/server/public/uploads/2024_2_34_44_PM_fa006e23b5.mp4 differ diff --git a/server/public/uploads/2024_2_35_47_PM_5c04fcc9c9.mp4 b/server/public/uploads/2024_2_35_47_PM_5c04fcc9c9.mp4 new file mode 100644 index 00000000..fc589e5b Binary files /dev/null and b/server/public/uploads/2024_2_35_47_PM_5c04fcc9c9.mp4 differ diff --git a/server/public/uploads/2024_2_36_50_PM_8ccce7d83e.mp4 b/server/public/uploads/2024_2_36_50_PM_8ccce7d83e.mp4 new file mode 100644 index 00000000..536948e5 Binary files /dev/null and b/server/public/uploads/2024_2_36_50_PM_8ccce7d83e.mp4 differ diff --git a/server/public/uploads/2024_2_37_53_PM_a932f7752b.mp4 b/server/public/uploads/2024_2_37_53_PM_a932f7752b.mp4 new file mode 100644 index 00000000..adcbf2b5 Binary files /dev/null and b/server/public/uploads/2024_2_37_53_PM_a932f7752b.mp4 differ diff --git a/server/public/uploads/2024_2_39_56_PM_6e73d90ac0.mp4 b/server/public/uploads/2024_2_39_56_PM_6e73d90ac0.mp4 new file mode 100644 index 00000000..d31ce2e7 Binary files /dev/null and b/server/public/uploads/2024_2_39_56_PM_6e73d90ac0.mp4 differ diff --git a/server/public/uploads/2024_2_40_57_PM_2294ee503d.mp4 b/server/public/uploads/2024_2_40_57_PM_2294ee503d.mp4 new file mode 100644 index 00000000..28b5fff8 Binary files /dev/null and b/server/public/uploads/2024_2_40_57_PM_2294ee503d.mp4 differ diff --git a/server/public/uploads/2024_2_41_58_PM_176a526262.mp4 b/server/public/uploads/2024_2_41_58_PM_176a526262.mp4 new file mode 100644 index 00000000..35ad0904 Binary files /dev/null and b/server/public/uploads/2024_2_41_58_PM_176a526262.mp4 differ diff --git a/server/public/uploads/2024_2_43_42_PM_f0d42f86ed.mp4 b/server/public/uploads/2024_2_43_42_PM_f0d42f86ed.mp4 new file mode 100644 index 00000000..cff16e49 Binary files /dev/null and b/server/public/uploads/2024_2_43_42_PM_f0d42f86ed.mp4 differ diff --git a/server/public/uploads/2024_2_44_45_PM_4d11efeb8e.mp4 b/server/public/uploads/2024_2_44_45_PM_4d11efeb8e.mp4 new file mode 100644 index 00000000..4945d25a Binary files /dev/null and b/server/public/uploads/2024_2_44_45_PM_4d11efeb8e.mp4 differ diff --git a/server/public/uploads/2024_2_46_35_PM_8f6a806c42.mp4 b/server/public/uploads/2024_2_46_35_PM_8f6a806c42.mp4 new file mode 100644 index 00000000..65cec377 Binary files /dev/null and b/server/public/uploads/2024_2_46_35_PM_8f6a806c42.mp4 differ diff --git a/server/public/uploads/2024_2_47_36_PM_130d99b897.mp4 b/server/public/uploads/2024_2_47_36_PM_130d99b897.mp4 new file mode 100644 index 00000000..8e3e7e0c Binary files /dev/null and b/server/public/uploads/2024_2_47_36_PM_130d99b897.mp4 differ diff --git a/server/public/uploads/2024_2_48_37_PM_c6f6caeddb.mp4 b/server/public/uploads/2024_2_48_37_PM_c6f6caeddb.mp4 new file mode 100644 index 00000000..363f9ea9 Binary files /dev/null and b/server/public/uploads/2024_2_48_37_PM_c6f6caeddb.mp4 differ diff --git a/server/public/uploads/2024_2_49_38_PM_eaa0caf428.mp4 b/server/public/uploads/2024_2_49_38_PM_eaa0caf428.mp4 new file mode 100644 index 00000000..afb1a380 Binary files /dev/null and b/server/public/uploads/2024_2_49_38_PM_eaa0caf428.mp4 differ diff --git a/server/public/uploads/2024_2_50_39_PM_ec4db6c921.mp4 b/server/public/uploads/2024_2_50_39_PM_ec4db6c921.mp4 new file mode 100644 index 00000000..e902178b Binary files /dev/null and b/server/public/uploads/2024_2_50_39_PM_ec4db6c921.mp4 differ diff --git a/server/public/uploads/2024_2_51_40_PM_59ffb10da6.mp4 b/server/public/uploads/2024_2_51_40_PM_59ffb10da6.mp4 new file mode 100644 index 00000000..9ef6e350 Binary files /dev/null and b/server/public/uploads/2024_2_51_40_PM_59ffb10da6.mp4 differ diff --git a/server/public/uploads/2024_2_52_49_PM_b06a8f7249.mp4 b/server/public/uploads/2024_2_52_49_PM_b06a8f7249.mp4 new file mode 100644 index 00000000..edc5cf49 Binary files /dev/null and b/server/public/uploads/2024_2_52_49_PM_b06a8f7249.mp4 differ diff --git a/server/public/uploads/2024_2_53_56_PM_e1b6f141d4.mp4 b/server/public/uploads/2024_2_53_56_PM_e1b6f141d4.mp4 new file mode 100644 index 00000000..eee477da Binary files /dev/null and b/server/public/uploads/2024_2_53_56_PM_e1b6f141d4.mp4 differ diff --git a/server/public/uploads/2024_2_54_59_PM_6c28c22b29.mp4 b/server/public/uploads/2024_2_54_59_PM_6c28c22b29.mp4 new file mode 100644 index 00000000..5082d273 Binary files /dev/null and b/server/public/uploads/2024_2_54_59_PM_6c28c22b29.mp4 differ diff --git a/server/public/uploads/2024_2_56_02_PM_3a9d65cae7.mp4 b/server/public/uploads/2024_2_56_02_PM_3a9d65cae7.mp4 new file mode 100644 index 00000000..28266af5 Binary files /dev/null and b/server/public/uploads/2024_2_56_02_PM_3a9d65cae7.mp4 differ diff --git a/server/public/uploads/2024_2_57_05_PM_927c8bc084.mp4 b/server/public/uploads/2024_2_57_05_PM_927c8bc084.mp4 new file mode 100644 index 00000000..1d70c693 Binary files /dev/null and b/server/public/uploads/2024_2_57_05_PM_927c8bc084.mp4 differ diff --git a/server/public/uploads/2024_2_58_08_PM_2b4884a101.mp4 b/server/public/uploads/2024_2_58_08_PM_2b4884a101.mp4 new file mode 100644 index 00000000..dbb20802 Binary files /dev/null and b/server/public/uploads/2024_2_58_08_PM_2b4884a101.mp4 differ diff --git a/server/public/uploads/2024_2_59_11_PM_f987500ffd.mp4 b/server/public/uploads/2024_2_59_11_PM_f987500ffd.mp4 new file mode 100644 index 00000000..782cd4a5 Binary files /dev/null and b/server/public/uploads/2024_2_59_11_PM_f987500ffd.mp4 differ diff --git a/server/public/uploads/2024_3_00_13_PM_d77ebd4e4b.mp4 b/server/public/uploads/2024_3_00_13_PM_d77ebd4e4b.mp4 new file mode 100644 index 00000000..41d16c28 Binary files /dev/null and b/server/public/uploads/2024_3_00_13_PM_d77ebd4e4b.mp4 differ diff --git a/server/public/uploads/2024_3_01_16_PM_1a578472bd.mp4 b/server/public/uploads/2024_3_01_16_PM_1a578472bd.mp4 new file mode 100644 index 00000000..5b13a4bf Binary files /dev/null and b/server/public/uploads/2024_3_01_16_PM_1a578472bd.mp4 differ diff --git a/server/public/uploads/2024_3_02_19_PM_090ab80271.mp4 b/server/public/uploads/2024_3_02_19_PM_090ab80271.mp4 new file mode 100644 index 00000000..d1fa02e0 Binary files /dev/null and b/server/public/uploads/2024_3_02_19_PM_090ab80271.mp4 differ diff --git a/server/public/uploads/2024_3_03_22_PM_eb60943830.mp4 b/server/public/uploads/2024_3_03_22_PM_eb60943830.mp4 new file mode 100644 index 00000000..ba10bcd0 Binary files /dev/null and b/server/public/uploads/2024_3_03_22_PM_eb60943830.mp4 differ diff --git a/server/public/uploads/2024_3_04_25_PM_90a3779a36.mp4 b/server/public/uploads/2024_3_04_25_PM_90a3779a36.mp4 new file mode 100644 index 00000000..fcb89008 Binary files /dev/null and b/server/public/uploads/2024_3_04_25_PM_90a3779a36.mp4 differ diff --git a/server/public/uploads/2024_3_05_28_PM_a784c5854a.mp4 b/server/public/uploads/2024_3_05_28_PM_a784c5854a.mp4 new file mode 100644 index 00000000..954b6277 Binary files /dev/null and b/server/public/uploads/2024_3_05_28_PM_a784c5854a.mp4 differ diff --git a/server/public/uploads/2024_3_06_31_PM_03fe177a9a.mp4 b/server/public/uploads/2024_3_06_31_PM_03fe177a9a.mp4 new file mode 100644 index 00000000..151432a5 Binary files /dev/null and b/server/public/uploads/2024_3_06_31_PM_03fe177a9a.mp4 differ diff --git a/server/public/uploads/2024_3_07_34_PM_b5c7776c72.mp4 b/server/public/uploads/2024_3_07_34_PM_b5c7776c72.mp4 new file mode 100644 index 00000000..9f0079ab Binary files /dev/null and b/server/public/uploads/2024_3_07_34_PM_b5c7776c72.mp4 differ diff --git a/server/public/uploads/2024_3_08_37_PM_dd9355a305.mp4 b/server/public/uploads/2024_3_08_37_PM_dd9355a305.mp4 new file mode 100644 index 00000000..02c2315e Binary files /dev/null and b/server/public/uploads/2024_3_08_37_PM_dd9355a305.mp4 differ diff --git a/server/public/uploads/2024_3_09_40_PM_8d9dc53163.mp4 b/server/public/uploads/2024_3_09_40_PM_8d9dc53163.mp4 new file mode 100644 index 00000000..917375de Binary files /dev/null and b/server/public/uploads/2024_3_09_40_PM_8d9dc53163.mp4 differ diff --git a/server/public/uploads/2024_3_10_43_PM_2e391de464.mp4 b/server/public/uploads/2024_3_10_43_PM_2e391de464.mp4 new file mode 100644 index 00000000..2ff06429 Binary files /dev/null and b/server/public/uploads/2024_3_10_43_PM_2e391de464.mp4 differ diff --git a/server/public/uploads/2024_3_11_46_PM_224b9395e8.mp4 b/server/public/uploads/2024_3_11_46_PM_224b9395e8.mp4 new file mode 100644 index 00000000..82c9a4a3 Binary files /dev/null and b/server/public/uploads/2024_3_11_46_PM_224b9395e8.mp4 differ diff --git a/server/public/uploads/2024_3_12_49_PM_4527a63b4b.mp4 b/server/public/uploads/2024_3_12_49_PM_4527a63b4b.mp4 new file mode 100644 index 00000000..6257794a Binary files /dev/null and b/server/public/uploads/2024_3_12_49_PM_4527a63b4b.mp4 differ diff --git a/server/public/uploads/2024_3_13_49_PM_fc9729e91e.mp4 b/server/public/uploads/2024_3_13_49_PM_fc9729e91e.mp4 new file mode 100644 index 00000000..8a3faca2 Binary files /dev/null and b/server/public/uploads/2024_3_13_49_PM_fc9729e91e.mp4 differ