Skip to content

Commit

Permalink
Version 0.8.39
Browse files Browse the repository at this point in the history
- Includes PR #253 (thanks @attie).
- If you do not wish to merge the POST data into the `params` (for example if you are using a webhook that provides other data as JSON), then you can add `&post_data=1` to the query string. If you do this, then the POST data will be available in the `post_data` key of the `params` object.
- Thanks to user @attie and PR #254 for these fixes and suggestions.
  • Loading branch information
jhuckaby committed Jan 18, 2020
1 parent c6c3a5d commit fad91ad
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2961,6 +2961,8 @@ In addition to the [Standard Response Format](#standard-response-format), the ID

If [Allow Queued Jobs](#allow-queued-jobs) is enabled on the event, the API response will also include a `queue` property, which will be set to the number of jobs currently queued up.

**Advanced Tip:** If you do not wish to merge the POST data into the `params` (for example if you are using a webhook that provides other data as JSON), then you can add `&post_data=1` to the query string. If you do this, then the POST data will be available in the `post_data` key of the `params` object.

### get_job_status

```
Expand Down
7 changes: 6 additions & 1 deletion lib/api/event.js
Original file line number Diff line number Diff line change
Expand Up @@ -339,9 +339,14 @@ module.exports = Class.create({
// run event manually (via "Run" button in UI or by API Key)
// can include any event overrides in params (such as 'now')
var self = this;
var params = Tools.mergeHashes( args.params, args.query );
if (!this.requireMaster(args, callback)) return;

// default behavor: merge post params and query together
// alt behavior (post_data): store post params into post_data
var params = Tools.copyHash( args.query, true );
if (args.query.post_data) params.post_data = args.params;
else Tools.mergeHashInto( params, args.params );

var criteria = {};
if (params.id) criteria.id = params.id;
else if (params.title) criteria.title = params.title;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Cronicle",
"version": "0.8.38",
"version": "0.8.39",
"description": "A simple, distributed task scheduler and runner with a web based UI.",
"author": "Joseph Huckaby <jhuckaby@gmail.com>",
"homepage": "https://github.com/jhuckaby/Cronicle",
Expand Down

0 comments on commit fad91ad

Please sign in to comment.