2019-02-25 17:55:55 +03:00
|
|
|
import ApplicationAdapter from 'ghost-admin/adapters/application';
|
|
|
|
|
|
|
|
export default ApplicationAdapter.extend({
|
|
|
|
// posts and pages now include everything by default
|
|
|
|
buildIncludeURL(store, modelName, id, snapshot, requestType, query) {
|
2019-11-14 20:33:35 +03:00
|
|
|
let url = this.buildURL(modelName, id, snapshot, requestType, query);
|
|
|
|
let parsedUrl = new URL(url);
|
|
|
|
|
|
|
|
if (snapshot && snapshot.adapterOptions && snapshot.adapterOptions.sendEmailWhenPublished) {
|
2020-11-06 21:54:27 +03:00
|
|
|
parsedUrl.searchParams.append('email_recipient_filter', snapshot.adapterOptions.sendEmailWhenPublished);
|
2019-11-14 20:33:35 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
return parsedUrl.toString();
|
2019-02-25 17:55:55 +03:00
|
|
|
},
|
|
|
|
|
|
|
|
buildQuery(store, modelName, options) {
|
|
|
|
return options;
|
|
|
|
}
|
|
|
|
});
|