GetApis.js 1.13 KB
import ApiCalls from "@/Services/ApiCalls.js";
export default {
    mixins: [ApiCalls],
    data() {
        return {
            courseData: [],


        }
    },
    methods: {
        /* getParticularCourseDetail */
        async getParticularCourseDetail(courseId) {

            try {
                let response = await this.getMethod("/getParticularCourseDetail", {
                    courseId: courseId
                })
                return response
            } catch (error) {
                console.log("error in getParticularCourseDetail - ", error.message)
            }
        },

        /* getStudentCourses - to get courseData */
        async getStudentCourses(params) {
            try {
                let response = await this.getMethod("/getStudentCourses", {
                    classId: params.classId,
                    studentId: params.studentId
                })
                this.courseData = response.data.data;
                console.log("coursesData - ", this.courseData)
            } catch (error) {
                console.log("error in getStudentCourses - ", error.message)
            }
        }

    },
}