Skip to content

Commit

Permalink
webhook working now for the json transformer
Browse files Browse the repository at this point in the history
  • Loading branch information
alnutile committed Jun 16, 2023
1 parent 2ba5a37 commit 479f217
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 0 additions & 1 deletion app/Http/Controllers/Sources/WebHookSourceController.php
Expand Up @@ -97,7 +97,6 @@ public function webhook(Project $project, Source $source)
$payload = request()->all();

logger('Webhook coming in', $payload);

$source->run($payload);

SourceRunCompleteEvent::dispatch($source);
Expand Down
6 changes: 4 additions & 2 deletions app/Listeners/RunTransformersListener.php
Expand Up @@ -3,8 +3,9 @@
namespace App\Listeners;

use App\Events\SourceRunCompleteEvent;
use Illuminate\Contracts\Queue\ShouldQueue;

class RunTransformersListener
class RunTransformersListener implements ShouldQueue
{
/**
* Create the event listener.
Expand All @@ -19,6 +20,7 @@ public function __construct()
*/
public function handle(SourceRunCompleteEvent $event): void
{
//
//see what transformers exists
//see if any are "related" to this source type
}
}
2 changes: 1 addition & 1 deletion routes/api.php
Expand Up @@ -16,7 +16,7 @@
|
*/

Route::post('/projects/{project}/sources/{source}/webhook',
Route::any('/projects/{project}/sources/{source}/webhook',
[WebHookSourceController::class, 'webhook'])
->name('api.sources.webhook');

Expand Down

0 comments on commit 479f217

Please sign in to comment.