|
@@ -9,8 +9,8 @@ import { CustomRequest } from '../../types/token/CustomRequest';
|
9
|
9
|
|
10
|
10
|
export const getAllCity = async (req: Request, res: Response): Promise<Response> => {
|
11
|
11
|
try {
|
12
|
|
- const { page, limit, search, sortBy, orderBy } = PaginationParam(req);
|
13
|
|
- const { cities, total } = await CityService.getAllCityService({ page, limit, search, sortBy, orderBy });
|
|
12
|
+ const { page, limit, search, sortBy, orderBy, province_id, } = PaginationParam(req, ['province_id']);
|
|
13
|
+ const { cities, total } = await CityService.getAllCityService({ page, limit, search, sortBy, orderBy, province_id });
|
14
|
14
|
|
15
|
15
|
return CityCollection(req, res, cities, total, page, limit, 'City data successfully retrieved');
|
16
|
16
|
} catch (err) {
|