mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-01 13:54:35 +03:00
15 lines
446 B
JavaScript
15 lines
446 B
JavaScript
|
import ApplicationAdapter from 'ghost-admin/adapters/application';
|
||
|
|
||
|
export default ApplicationAdapter.extend({
|
||
|
urlForDeleteRecord(id, modelName, snapshot) {
|
||
|
let url = this._super(...arguments);
|
||
|
let parsedUrl = new URL(url);
|
||
|
|
||
|
if (snapshot && snapshot.adapterOptions && snapshot.adapterOptions.cancel) {
|
||
|
parsedUrl.searchParams.set('cancel', 'true');
|
||
|
}
|
||
|
|
||
|
return parsedUrl.toString();
|
||
|
}
|
||
|
});
|