0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-20 22:42:53 -05:00

Improved JSDoc in default scheduler

no issue

- Previously used notation was not a valid JSDoc one. With this correction IDEs will provide more accurate information about all furnction parameters
This commit is contained in:
Naz 2020-12-16 17:25:05 +13:00
parent 79b723eee6
commit 31a69d18f0

View file

@ -46,14 +46,11 @@ util.inherits(SchedulingDefault, SchedulingBase);
* A new job get's added when the post scheduler module receives a new model event e.g. "post.scheduled".
*
* @param {Object} object
* {
* time: [Number] A unix timestamp
* url: [String] The full post/page API url to publish it.
* extra: {
* httpMethod: [String] The method of the target API endpoint.
* oldTime: [Number] The previous published time.
* }
* }
* @param {Number} object.time - unix timestamp
* @param {String} object.url - full post/page API url to publish the resource.
* @param {Object} object.extra
* @param {String} object.extra.httpMethod - the method of the target API endpoint.
* @param {Number} object.extra.oldTime - the previous published time.
*/
SchedulingDefault.prototype.schedule = function (object) {
this._addJob(object);
@ -65,18 +62,13 @@ SchedulingDefault.prototype.schedule = function (object) {
* Unscheduling means: scheduled -> draft.
*
* @param {Object} object
* {
* time: [Number] A unix timestamp
* url: [String] The full post/page API url to publish it.
* extra: {
* httpMethod: [String] The method of the target API endpoint.
* oldTime: [Number] The previous published time.
* }
* }
* @param {Number} object.time - unix timestamp
* @param {String} object.url - full post/page API url to publish the resource.
* @param {Object} object.extra
* @param {String} object.extra.httpMethod - the method of the target API endpoint.
* @param {Number} object.extra.oldTime - the previous published time.
* @param {Object} options
* {
* bootstrap: [Boolean]
* }
* @param {Boolean} [options.bootstrap]
*/
SchedulingDefault.prototype.unschedule = function (object, options = {bootstrap: false}) {
/**