mirror of
https://github.com/whyour/qinglong.git
synced 2026-12-01 09:45:36 +08:00
修改依赖管理默认排序
This commit is contained in:
1 parent
e4ad8f512e
commit
144b543091
2 files changed
+9
-3
No files matched your search
@@ -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