mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-24 06:35:49 +03:00
Redefined context.integration
no issue - we only have access to the ID at the moment - we really don't want to end up in the same situation as with "context.user"
This commit is contained in:
parent
68bdcfc753
commit
a8e0a173c2
@ -15,7 +15,9 @@ const http = (apiImpl) => {
|
||||
id: req.api_key.get('id'),
|
||||
type: req.api_key.get('type')
|
||||
};
|
||||
integration = req.api_key.get('integration_id');
|
||||
integration = {
|
||||
id: req.api_key.get('integration_id')
|
||||
};
|
||||
}
|
||||
|
||||
if ((req.user && req.user.id) || (req.user && models.User.isExternalUser(req.user.id))) {
|
||||
|
@ -445,7 +445,7 @@ ghostBookshelf.Model = ghostBookshelf.Model.extend({
|
||||
getActor(options = {context: {}}) {
|
||||
if (options.context.integration) {
|
||||
return {
|
||||
id: options.context.integration,
|
||||
id: options.context.integration.id,
|
||||
type: 'integration'
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user