Files
mixtape/zero.Backoffice.UI/app/modules/languages/api.ts
T

16 lines
784 B
TypeScript
Raw Normal View History

2021-12-15 21:52:00 +01:00
import { get, post, put, del, ApiRequestConfig, ApiRequestQuery } from '../../services/request';
export default {
getEmpty: (flavor?: string, config?: ApiRequestConfig) => get("languages/empty", { ...config, params: { flavor } }),
getById: (id: string, changeVector?: string, config?: ApiRequestConfig) => get('languages/' + id, { ...config, params: { changeVector } }),
getByQuery: (query: ApiRequestQuery, config?: ApiRequestConfig) => get('languages', { ...config, params: { ...query } }),
create: (model: any, config?: ApiRequestConfig) => post('languages', model, config),
update: (model: any, config?: ApiRequestConfig) => put('languages/' + model.id, model, config),
2021-12-16 16:59:27 +01:00
delete: (id: string, config?: ApiRequestConfig) => del('languages/' + id, null, config),
2021-12-15 21:52:00 +01:00
};