diff --git a/src/domain/activity/study/repository/study.repository.ts b/src/domain/activity/study/repository/study.repository.ts index 982aac6..26feb0d 100644 --- a/src/domain/activity/study/repository/study.repository.ts +++ b/src/domain/activity/study/repository/study.repository.ts @@ -16,12 +16,13 @@ export class StudyRepository { // Read async findAll(): Promise { - return this.studyModel.find().exec(); + return this.studyModel.find().sort({ uploadedAt: -1 }).exec(); } async findAllPage(page: number): Promise { return this.studyModel .find() + .sort({ uploadedAt: -1 }) .skip((page - 1) * 10) .limit(10) .exec();