mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-29 13:52:10 +03:00
Updated usage of the members bulk action endpoint
refs https://github.com/TryGhost/Team/issues/1077 The bulk action endpoint has updated the request body format and so this must be updated to continue to work with it.
This commit is contained in:
parent
9dcd7e499a
commit
a5f158c061
@ -478,8 +478,10 @@ export default class MembersController extends Controller {
|
||||
// response contains details of which members failed to be unsubscribe
|
||||
const response = yield this.ajax.put(unsubscribeUrl, {
|
||||
data: {
|
||||
action: 'unsubscribe',
|
||||
meta: {}
|
||||
bulk: {
|
||||
action: 'unsubscribe',
|
||||
meta: {}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@ -499,10 +501,12 @@ export default class MembersController extends Controller {
|
||||
const addLabelUrl = `${this.ghostPaths.url.api('members/bulk')}?${query}`;
|
||||
const response = yield this.ajax.put(addLabelUrl, {
|
||||
data: {
|
||||
action: 'addLabel',
|
||||
meta: {
|
||||
label: {
|
||||
id: selectedLabel
|
||||
bulk: {
|
||||
action: 'addLabel',
|
||||
meta: {
|
||||
label: {
|
||||
id: selectedLabel
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -521,10 +525,12 @@ export default class MembersController extends Controller {
|
||||
const removeLabelUrl = `${this.ghostPaths.url.api('members/bulk')}?${query}`;
|
||||
const response = yield this.ajax.put(removeLabelUrl, {
|
||||
data: {
|
||||
action: 'removeLabel',
|
||||
meta: {
|
||||
label: {
|
||||
id: selectedLabel
|
||||
bulk: {
|
||||
action: 'removeLabel',
|
||||
meta: {
|
||||
label: {
|
||||
id: selectedLabel
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user