ali 3 anni fa
parent
commit
cd49434ba5

+ 0 - 15
src/api/models/Classroom.js

@@ -9,7 +9,6 @@ export default class ClassroomAPI extends APIRepository {
     this.APIAdresses = {
       base: '/lma/classrooms',
       byId: (id) => '/lma/classrooms/' + id,
-      moreDetails: (id) => '/lma/classrooms/' + id + '/more_details',
       enroll: (id) => '/lma/classrooms/' + id + '/enroll',
       drop: (id) => '/lma/classrooms/' + id + '/drop',
       members: '/lma/registrations',
@@ -70,20 +69,6 @@ export default class ClassroomAPI extends APIRepository {
     })
   }
 
-  moreDetails (id) {
-    return this.sendRequest({
-      apiMethod: 'get',
-      api: this.api,
-      request: this.APIAdresses.moreDetails(id),
-      resolveCallback: (response) => {
-        return new Classroom(response.data)
-      },
-      rejectCallback: (error) => {
-        return error
-      }
-    })
-  }
-
   enrollByUser (id) {
     return this.sendRequest({
       apiMethod: 'put',

+ 1 - 1
src/components/Widgets/Other/ShowClassroomInfo/ShowClassroomInfo.vue

@@ -401,7 +401,7 @@ export default {
     },
     getClassroom () {
       this.loading = true
-      return APIGateway.classroom.moreDetails(this.$route.params.id)
+      return APIGateway.classroom.get(this.$route.params.id)
     }
   }
 }

+ 1 - 1
src/pages/User/Profile/classroomInfo.vue

@@ -180,7 +180,7 @@ export default {
       sessionsInputs: [
         { type: 'hidden', name: 'classroom', value: classroomId }
       ],
-      api: APIGateway.classroom.APIAdresses.moreDetails(classroomId),
+      api: APIGateway.classroom.APIAdresses.get(classroomId),
       sessionsApi: APIGateway.session.APIAdresses.attendanceSheets,
       classroom: new Classroom(),
       table: {

+ 1 - 1
src/pages/User/Profile/projectInfo.vue

@@ -138,7 +138,7 @@ export default {
     getClassroomInfo () {
       const classroomId = this.$route.params.classroom_id
       this.classroom.loading = true
-      APIGateway.classroom.moreDetails(classroomId)
+      APIGateway.classroom.get(classroomId)
         .then((classroom) => {
           this.classroom = new Classroom(classroom)
           this.classroom.loading = false