mirror of
https://github.com/sergeyyarkov/educt-server.git
synced 2026-10-11 18:29:15 +03:00
fixed: show color data when deleting a lesson
This commit is contained in:
parent
426a3283f6
commit
56493f97b4
@ -149,7 +149,7 @@ export default class LessonRepository {
|
|||||||
* @returns Deleted lesson or null
|
* @returns Deleted lesson or null
|
||||||
*/
|
*/
|
||||||
public async delete(id: string | number): Promise<Lesson | null> {
|
public async delete(id: string | number): Promise<Lesson | null> {
|
||||||
const lesson = await this.Lesson.query().where('id', id).first();
|
const lesson = await this.Lesson.query().where('id', id).preload('color').first();
|
||||||
|
|
||||||
if (lesson) {
|
if (lesson) {
|
||||||
await lesson.delete();
|
await lesson.delete();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user