mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-28 05:14:12 +03:00
Fixed page actions stored under page resource type
refs bde9b84221
- the commit above claimed to fix an issue where actions taken on pages
were stored using the `post` resource type
- whilst it does that, this actually breaks part of the API because we
use the `resource_type` to join on tables when doing an
`include=resource`
- this commit reverts that functionality and instead stores the type in
the `context` field so we can still differentiate between pages and
posts
This commit is contained in:
parent
d91d6c1311
commit
3a9016639c
@ -39,9 +39,7 @@ Post = ghostBookshelf.Model.extend({
|
||||
tableName: 'posts',
|
||||
|
||||
actionsCollectCRUD: true,
|
||||
actionsResourceType: function () {
|
||||
return this.get('type') || this.previous('type');
|
||||
},
|
||||
actionsExtraContext: ['type'],
|
||||
|
||||
/**
|
||||
* @NOTE
|
||||
|
Loading…
Reference in New Issue
Block a user