diff --git a/apps/hub-server/modules/moodle.ts b/apps/hub-server/modules/moodle.ts index fd3f733e..1d44882c 100644 --- a/apps/hub-server/modules/moodle.ts +++ b/apps/hub-server/modules/moodle.ts @@ -2,7 +2,7 @@ import axios from "axios"; export const getMoodleUserById = async (id: string) => { const { data: user } = await axios.get( - `${process.env.MOODLE_URL}/webservice/rest/server.php`, + `${process.env.NEXT_PUBLIC_MOODLE_URL}/webservice/rest/server.php`, { params: { wstoken: process.env.MOODLE_TOKEN, @@ -31,7 +31,7 @@ export const getMoodleUserById = async (id: string) => { export const getMoodleQuizResult = async (userId: string, quizId: string) => { const { data: quizzes } = await axios.get( - `${process.env.MOODLE_URL}/webservice/rest/server.php`, + `${process.env.NEXT_PUBLIC_MOODLE_URL}/webservice/rest/server.php`, { params: { wstoken: process.env.MOODLE_TOKEN, @@ -45,12 +45,9 @@ export const getMoodleQuizResult = async (userId: string, quizId: string) => { return quizzes; }; -export const getMoodleCourseCompletionStatus = async ( - userId: string, - courseId: string, -) => { +export const getMoodleCourseCompletionStatus = async (userId: string, courseId: string) => { const { data: completionStatus } = await axios.get( - `${process.env.MOODLE_URL}/webservice/rest/server.php`, + `${process.env.NEXT_PUBLIC_MOODLE_URL}/webservice/rest/server.php`, { params: { wstoken: process.env.MOODLE_TOKEN,