mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-22 10:21:36 +03:00
77484210ee
no issue - the new publishing flow is GA making the old publish menu unused - removed all related code
31 lines
1019 B
JavaScript
31 lines
1019 B
JavaScript
import ApplicationAdapter from 'ghost-admin/adapters/application';
|
|
|
|
export default class Post extends ApplicationAdapter {
|
|
// posts and pages now include everything by default
|
|
buildIncludeURL(store, modelName, id, snapshot, requestType, query) {
|
|
const url = this.buildURL(modelName, id, snapshot, requestType, query);
|
|
const parsedUrl = new URL(url);
|
|
|
|
if (snapshot?.adapterOptions?.newsletter) {
|
|
const newsletter = snapshot.adapterOptions.newsletter;
|
|
parsedUrl.searchParams.append('newsletter', newsletter);
|
|
|
|
let emailSegment = snapshot?.adapterOptions?.emailSegment;
|
|
|
|
if (emailSegment) {
|
|
if (emailSegment === 'status:free,status:-free') {
|
|
emailSegment = 'all';
|
|
}
|
|
|
|
parsedUrl.searchParams.append('email_segment', emailSegment);
|
|
}
|
|
}
|
|
|
|
return parsedUrl.toString();
|
|
}
|
|
|
|
buildQuery(store, modelName, options) {
|
|
return options;
|
|
}
|
|
}
|