44 lines
959 B
TypeScript
44 lines
959 B
TypeScript
import { buildApiUrl } from '../../config/api-url.util';
|
|
|
|
|
|
export const COUNTRY_ENDPOINTS = {
|
|
dataTable: buildApiUrl(
|
|
'masterAdmin',
|
|
'/v1/countries/datatable'
|
|
),
|
|
|
|
create: buildApiUrl(
|
|
'masterAdmin',
|
|
'/v1/countries'
|
|
),
|
|
|
|
getById: (id: string) =>
|
|
buildApiUrl(
|
|
'masterAdmin',
|
|
`/v1/countries/${encodeURIComponent(id)}`
|
|
),
|
|
|
|
autocomplete: buildApiUrl(
|
|
'masterAdmin',
|
|
'/v1/countries/autocomplete'
|
|
),
|
|
|
|
update: (id: string) =>
|
|
buildApiUrl(
|
|
'masterAdmin',
|
|
`/v1/countries/${encodeURIComponent(id)}`
|
|
),
|
|
|
|
delete: (id: string) =>
|
|
buildApiUrl(
|
|
'masterAdmin',
|
|
`/v1/countries/${encodeURIComponent(id)}`
|
|
),
|
|
|
|
changeStatus: (id: string) =>
|
|
buildApiUrl(
|
|
'masterAdmin',
|
|
`/v1/countries/${encodeURIComponent(id)}/status`
|
|
),
|
|
} as const;
|