mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-04-08 02:52:39 -05:00
Fixed extra arguments being supplied to function calls
- identified by tsc, this shouldn't change any functionality because there were extra arguments being supplied and were unused
This commit is contained in:
parent
29cc3003c7
commit
1fd155d56a
7 changed files with 10 additions and 10 deletions
|
@ -5,7 +5,7 @@ const settingsCache = require('../../shared/settings-cache');
|
|||
|
||||
function getOgImage(data) {
|
||||
const context = data.context ? data.context : null;
|
||||
const contextObject = getContextObject(data, context, false);
|
||||
const contextObject = getContextObject(data, context);
|
||||
|
||||
if (_.includes(context, 'home')) {
|
||||
const imgUrl = settingsCache.get('og_image') || settingsCache.get('cover_image');
|
||||
|
|
|
@ -5,7 +5,7 @@ const settingsCache = require('../../shared/settings-cache');
|
|||
|
||||
function getTwitterImage(data) {
|
||||
const context = data.context ? data.context : null;
|
||||
const contextObject = getContextObject(data, context, false);
|
||||
const contextObject = getContextObject(data, context);
|
||||
|
||||
if (_.includes(context, 'home')) {
|
||||
const imgUrl = settingsCache.get('twitter_image') || settingsCache.get('cover_image');
|
||||
|
|
|
@ -144,8 +144,8 @@ const controller = {
|
|||
}
|
||||
},
|
||||
permissions: true,
|
||||
query(frame) {
|
||||
return commentsService.controller.destroy(frame);
|
||||
query() {
|
||||
return commentsService.controller.destroy();
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
@ -25,11 +25,11 @@ const forPost = (attrs, options) => {
|
|||
}
|
||||
|
||||
if (relation === 'author' && attrs.author) {
|
||||
attrs.author = forUser(attrs.author, options);
|
||||
attrs.author = forUser(attrs.author);
|
||||
}
|
||||
|
||||
if (relation === 'authors' && attrs.authors) {
|
||||
attrs.authors = attrs.authors.map(author => forUser(author, options));
|
||||
attrs.authors = attrs.authors.map(author => forUser(author));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -144,7 +144,7 @@ const activityFeedMapper = (event, frame) => {
|
|||
return clickEventMapper(event, frame);
|
||||
}
|
||||
if (event.type === 'aggregated_click_event') {
|
||||
return aggregatedClickEventMapper(event, frame);
|
||||
return aggregatedClickEventMapper(event);
|
||||
}
|
||||
if (event.type === 'feedback_event') {
|
||||
return feedbackEventMapper(event, frame);
|
||||
|
|
|
@ -94,7 +94,7 @@ class Attribution {
|
|||
}
|
||||
|
||||
// Fetch model
|
||||
const model = await this.#urlTranslator.getResourceById(this.id, this.type, {absolute: true});
|
||||
const model = await this.#urlTranslator.getResourceById(this.id, this.type);
|
||||
return this.getResource(model);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@ const versionMismatchHandler = (APIVersionCompatibilityService) => {
|
|||
* @param {import('express').Response} res
|
||||
* @param {import('express').NextFunction} next
|
||||
*/
|
||||
return async function versionMismatchHandlerMiddlware(err, req, res, next) {
|
||||
return async function versionMismatchHandlerMiddleware(err, req, res, next) {
|
||||
if (err && err.errorType === 'RequestNotAcceptableError') {
|
||||
if (err.code === 'UPDATE_CLIENT') {
|
||||
const {key, type} = extractApiKey(req);
|
||||
|
@ -24,7 +24,7 @@ const versionMismatchHandler = (APIVersionCompatibilityService) => {
|
|||
}
|
||||
}
|
||||
|
||||
next(err, req, res);
|
||||
next(err);
|
||||
};
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue