mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-03-25 02:31:59 -05: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
1 changed files with 1 additions and 3 deletions
|
@ -39,9 +39,7 @@ Post = ghostBookshelf.Model.extend({
|
||||||
tableName: 'posts',
|
tableName: 'posts',
|
||||||
|
|
||||||
actionsCollectCRUD: true,
|
actionsCollectCRUD: true,
|
||||||
actionsResourceType: function () {
|
actionsExtraContext: ['type'],
|
||||||
return this.get('type') || this.previous('type');
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @NOTE
|
* @NOTE
|
||||||
|
|
Loading…
Add table
Reference in a new issue