ändere moodle URL env name
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user