优化资源查询
This commit is contained in:
@@ -34,7 +34,4 @@ export class Resource {
|
||||
|
||||
@UpdateDateColumn({ precision: 3 })
|
||||
updatedAt: Date;
|
||||
|
||||
@DeleteDateColumn({ nullable: true, precision: 3 })
|
||||
deletedAt: Date;
|
||||
}
|
||||
@@ -11,6 +11,11 @@ export class ResourceService {
|
||||
) { }
|
||||
|
||||
async findAll(): Promise<Resource[]> {
|
||||
return this.resourceRepository.find();
|
||||
return this.resourceRepository.find({
|
||||
where: { isHidden: false },
|
||||
order: {
|
||||
createdAt: 'DESC',
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user