From d23ea6732105b7b4f10b9c1dc364a69ca33affb0 Mon Sep 17 00:00:00 2001 From: PxlLoewe <72106766+PxlLoewe@users.noreply.github.com> Date: Tue, 24 Jun 2025 22:16:26 -0700 Subject: [PATCH] =?UTF-8?q?=C3=A4ndere=20moodle=20URL=20env=20name?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/hub-server/modules/moodle.ts | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) 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,