sort จังหวัด

This commit is contained in:
Kittapath 2024-05-14 11:51:40 +07:00
parent d57d4220dd
commit c5e99ee771
3 changed files with 3 additions and 3 deletions

View file

@ -41,7 +41,7 @@ export class DistrictController extends Controller {
async GetResult() { async GetResult() {
const _district = await this.districtRepository.find({ const _district = await this.districtRepository.find({
select: ["id", "name", "createdAt", "lastUpdatedAt", "createdFullName", "lastUpdateFullName"], select: ["id", "name", "createdAt", "lastUpdatedAt", "createdFullName", "lastUpdateFullName"],
order: { createdAt: "ASC" }, order: { name: "ASC" },
}); });
return new HttpSuccess(_district); return new HttpSuccess(_district);
} }

View file

@ -41,7 +41,7 @@ export class ProvinceController extends Controller {
async GetResult() { async GetResult() {
const _province = await this.provinceRepository.find({ const _province = await this.provinceRepository.find({
select: ["id", "name", "createdAt", "lastUpdatedAt", "createdFullName", "lastUpdateFullName"], select: ["id", "name", "createdAt", "lastUpdatedAt", "createdFullName", "lastUpdateFullName"],
order: { createdAt: "ASC" }, order: { name: "ASC" },
}); });
return new HttpSuccess(_province); return new HttpSuccess(_province);
} }

View file

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