ändere moodle URL env name
This commit is contained in:
@@ -2,7 +2,7 @@ import axios from "axios";
|
|||||||
|
|
||||||
export const getMoodleUserById = async (id: string) => {
|
export const getMoodleUserById = async (id: string) => {
|
||||||
const { data: user } = await axios.get(
|
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: {
|
params: {
|
||||||
wstoken: process.env.MOODLE_TOKEN,
|
wstoken: process.env.MOODLE_TOKEN,
|
||||||
@@ -31,7 +31,7 @@ export const getMoodleUserById = async (id: string) => {
|
|||||||
|
|
||||||
export const getMoodleQuizResult = async (userId: string, quizId: string) => {
|
export const getMoodleQuizResult = async (userId: string, quizId: string) => {
|
||||||
const { data: quizzes } = await axios.get(
|
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: {
|
params: {
|
||||||
wstoken: process.env.MOODLE_TOKEN,
|
wstoken: process.env.MOODLE_TOKEN,
|
||||||
@@ -45,12 +45,9 @@ export const getMoodleQuizResult = async (userId: string, quizId: string) => {
|
|||||||
return quizzes;
|
return quizzes;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const getMoodleCourseCompletionStatus = async (
|
export const getMoodleCourseCompletionStatus = async (userId: string, courseId: string) => {
|
||||||
userId: string,
|
|
||||||
courseId: string,
|
|
||||||
) => {
|
|
||||||
const { data: completionStatus } = await axios.get(
|
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: {
|
params: {
|
||||||
wstoken: process.env.MOODLE_TOKEN,
|
wstoken: process.env.MOODLE_TOKEN,
|
||||||
|
|||||||
Reference in New Issue
Block a user