mirror of
https://github.com/whyour/qinglong.git
synced 2026-07-01 04:40:38 +08:00
修改依赖管理默认排序
This commit is contained in:
@@ -125,8 +125,11 @@ export default class DependenceService {
|
||||
return docs;
|
||||
}
|
||||
|
||||
private async find(query: any, sort?: any): Promise<Dependence[]> {
|
||||
const docs = await DependenceModel.findAll({ where: { ...query } });
|
||||
private async find(query: any, sort: any = []): Promise<Dependence[]> {
|
||||
const docs = await DependenceModel.findAll({
|
||||
where: { ...query },
|
||||
order: [...sort, ['createdAt', 'DESC']],
|
||||
});
|
||||
return docs;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user