File tree Expand file tree Collapse file tree
ghost/core/core/server/adapters/scheduling/post-scheduling Expand file tree Collapse file tree Original file line number Diff line number Diff 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 */
1616const 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
You can’t perform that action at this time.
0 commit comments