sort จังหวัด อำเภอ ตำบล

This commit is contained in:
Bright 2024-11-27 10:37:26 +07:00
parent b4b49b7378
commit 0fa198a771
3 changed files with 30 additions and 5 deletions

View file

@ -43,7 +43,10 @@ export class SubDistrictController extends Controller {
async GetResult() {
const _subDistrict = await this.subDistrictRepository.find({
select: ["id", "name", "createdAt", "lastUpdatedAt", "createdFullName", "lastUpdateFullName"],
order: { name: "ASC" },
order: {
name: "ASC",
createdAt: "DESC"
},
});
return new HttpSuccess(_subDistrict);
}