Notifications ordered
This commit is contained in:
parent
e264420afa
commit
666b98683a
@ -33,6 +33,7 @@ export default class UserNotificationController extends ApiController {
|
||||
const userId: string = req.body.user.userId;
|
||||
if(query.where?.user_uid) delete query.where.user_uid;
|
||||
if(query.where?.user?.uid) delete query.where.user.uid;
|
||||
query.orderBy = { notification : { created_at: "asc" }};
|
||||
const notificationWhereInput: Prisma.UserNotificationsWhereInput = { ...query.where, user_uid: userId };
|
||||
query.where = notificationWhereInput;
|
||||
|
||||
|
@ -20,7 +20,6 @@ export default class UserNotificationRepository extends BaseRepository {
|
||||
* @description : Find many user notifications
|
||||
*/
|
||||
public async findMany(query: Prisma.UserNotificationsFindManyArgs) {
|
||||
query.take = Math.min(query.take || this.defaultFetchRows, this.maxFetchRows);
|
||||
return this.model.findMany(query);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user