2021-10-06 17:29:15 +03:00
|
|
|
import ApplicationAdapter from 'ghost-admin/adapters/application';
|
|
|
|
|
2022-02-02 19:57:22 +03:00
|
|
|
export default class Offer extends ApplicationAdapter {
|
2021-10-06 17:29:15 +03:00
|
|
|
queryRecord(store, type, query) {
|
|
|
|
if (query && query.id) {
|
|
|
|
let {id} = query;
|
|
|
|
delete query.id;
|
|
|
|
let url = this.buildURL(type.modelName, id, query, 'findRecord');
|
|
|
|
return this.ajax(url, 'GET', {data: query});
|
|
|
|
}
|
|
|
|
|
2022-02-02 19:57:22 +03:00
|
|
|
return super.queryRecord(...arguments);
|
|
|
|
}
|
2021-10-06 17:29:15 +03:00
|
|
|
|
|
|
|
urlForDeleteRecord() {
|
2022-02-02 19:57:22 +03:00
|
|
|
let url = super.urlForDeleteRecord(...arguments);
|
2021-10-06 17:29:15 +03:00
|
|
|
let parsedUrl = new URL(url);
|
|
|
|
|
|
|
|
return parsedUrl.toString();
|
|
|
|
}
|
2022-02-02 19:57:22 +03:00
|
|
|
}
|