GetApis.js
1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
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)
}
}
},
}