ändere moodle URL env name

This commit is contained in:
PxlLoewe
2025-06-24 22:16:26 -07:00
parent 8b2131e975
commit d23ea67321

View File

@@ -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,