mirror of
https://github.com/sergeyyarkov/educt-server.git
synced 2026-10-11 18:29:15 +03:00
fix: fixed material downloading
This commit is contained in:
parent
b44f3262b7
commit
ef3711a367
@ -127,11 +127,8 @@ export default class LessonsController extends BaseController {
|
||||
throw new Exception(message, status, error.code);
|
||||
}
|
||||
|
||||
/**
|
||||
* Send file to user
|
||||
*/
|
||||
if (data instanceof LessonMaterial) {
|
||||
this.sendFileFromDrive(`materials/${data.name}`, ctx);
|
||||
return this.sendFileFromDrive(`materials/${data.name}`, ctx);
|
||||
}
|
||||
|
||||
return this.sendResponse(ctx, data, message, status);
|
||||
|
||||
@ -15,9 +15,6 @@ Route.group(() => {
|
||||
Route.get('/materials/:fileName', 'Api/v1/LessonsController.getMaterial')
|
||||
.middleware('role:admin,teacher,student')
|
||||
.as('lessons.get-material');
|
||||
// Route.get('/video/:fileName', 'Api/v1/LessonsController.getVideo')
|
||||
// .middleware('role:admin,teacher,student')
|
||||
// .as('lessons.get-video');
|
||||
Route.get('/:id/progress', 'Api/v1/LessonsController.getVideoProgress')
|
||||
.middleware('role:admin,teacher,student')
|
||||
.as('lessons.get-video-progress');
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user