mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-03-11 02:12:21 -05:00
v4.8.1
-----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQTqYa7kNs8D7Oo9dgLSEYbwtHKVrQUCYNRcHQAKCRDSEYbwtHKV rQJeAP9ufmgIztn1oj8kF7tZMZk4xaVCakqIgyQBlPvFKc+aawD8Dv44mmZ4Ntar 7FQ52i07TCwk/b8lCUwxD4maYBuZNAE= =fgVN -----END PGP SIGNATURE----- gpgsig -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQTqYa7kNs8D7Oo9dgLSEYbwtHKVrQUCYNRciwAKCRDSEYbwtHKV rRatAQCJ27vyVeGYlnXVWF0XSgj3+QEwl2eEgh4GoVp4BPzHAwD/WrGvKRvddDtA kiqv93vRTda3GV1R4FGYVl34MwbGFAA= =+Yci -----END PGP SIGNATURE----- Merged v4.8.1 into main v4.8.1
This commit is contained in:
commit
ac8029680c
5 changed files with 12 additions and 5 deletions
|
@ -1 +1 @@
|
||||||
Subproject commit a2517f3190e9ee77ef0e7fef5372fae43356c002
|
Subproject commit 4c4fcdad486670e9202f8ca22f77c4333c3bb3ec
|
|
@ -97,6 +97,8 @@ module.exports = {
|
||||||
},
|
},
|
||||||
permissions: true,
|
permissions: true,
|
||||||
query(frame) {
|
query(frame) {
|
||||||
|
frame.options.require = true;
|
||||||
|
|
||||||
return models.Snippet.destroy(frame.options)
|
return models.Snippet.destroy(frame.options)
|
||||||
.then(() => null)
|
.then(() => null)
|
||||||
.catch(models.Snippet.NotFoundError, () => {
|
.catch(models.Snippet.NotFoundError, () => {
|
||||||
|
|
|
@ -97,6 +97,8 @@ module.exports = {
|
||||||
},
|
},
|
||||||
permissions: true,
|
permissions: true,
|
||||||
query(frame) {
|
query(frame) {
|
||||||
|
frame.options.require = true;
|
||||||
|
|
||||||
return models.Snippet.destroy(frame.options)
|
return models.Snippet.destroy(frame.options)
|
||||||
.then(() => null)
|
.then(() => null)
|
||||||
.catch(models.Snippet.NotFoundError, () => {
|
.catch(models.Snippet.NotFoundError, () => {
|
||||||
|
|
|
@ -198,7 +198,7 @@ module.exports = function (Bookshelf) {
|
||||||
* @param {Object} [unfilteredOptions]
|
* @param {Object} [unfilteredOptions]
|
||||||
* @return {Promise<Bookshelf['Model']>} Empty Model
|
* @return {Promise<Bookshelf['Model']>} Empty Model
|
||||||
*/
|
*/
|
||||||
destroy: async function destroy(unfilteredOptions) {
|
destroy: function destroy(unfilteredOptions) {
|
||||||
const options = this.filterOptions(unfilteredOptions, 'destroy');
|
const options = this.filterOptions(unfilteredOptions, 'destroy');
|
||||||
|
|
||||||
if (!options.destroyBy) {
|
if (!options.destroyBy) {
|
||||||
|
@ -208,8 +208,11 @@ module.exports = function (Bookshelf) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fetch the object before destroying it, so that the changed data is available to events
|
// Fetch the object before destroying it, so that the changed data is available to events
|
||||||
const obj = await this.forge(options.destroyBy).fetch(options);
|
return this.forge(options.destroyBy)
|
||||||
return obj.destroy(options);
|
.fetch(options)
|
||||||
|
.then(function then(obj) {
|
||||||
|
return obj.destroy(options);
|
||||||
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
// When loading an instance, subclasses can specify default to fetch
|
// When loading an instance, subclasses can specify default to fetch
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "ghost",
|
"name": "ghost",
|
||||||
"version": "4.8.0",
|
"version": "4.8.1",
|
||||||
"description": "The professional publishing platform",
|
"description": "The professional publishing platform",
|
||||||
"author": "Ghost Foundation",
|
"author": "Ghost Foundation",
|
||||||
"homepage": "https://ghost.org",
|
"homepage": "https://ghost.org",
|
||||||
|
|
Loading…
Add table
Reference in a new issue