Skip to content

Commit d01c5ee

Browse files
authored
Fixed type errors in scheduling auth token code (TryGhost#27420)
no ref This is a types-only change that fixes some type errors. No functionality should be affected.
1 parent 270b70e commit d01c5ee

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

ghost/core/core/server/adapters/scheduling/post-scheduling/scheduling-auth-token.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,19 @@ const jwt = require('jsonwebtoken');
77
* @param {Object} options
88
* @param {string} options.publishedAt - ISO date
99
* @param {string} options.apiUrl - url of the JWT's audience
10-
* @param {string} options.key - integration key
10+
* @param {object} options.key - integration key
1111
* @param {string} options.key.id - key ID
1212
* @param {string} options.key.secret - key secret
1313
*
1414
* @return {string} the JSON Web Token
1515
*/
1616
const getSignedAdminToken = function ({publishedAt, apiUrl, key}) {
17-
const JWT_OPTIONS = {
17+
const JWT_OPTIONS = /** @type {const} */ ({
1818
keyid: key.id,
1919
algorithm: 'HS256',
2020
audience: apiUrl,
2121
noTimestamp: true
22-
};
22+
});
2323

2424
// Default token expiry is till 6 hours after scheduled time
2525
// or if published_at is in past then till 6 hours after blog start

0 commit comments

Comments
 (0)