Skip to content

Commit 5bc53b1

Browse files
committed
add webhook services to dependancy injection
1 parent b92bd11 commit 5bc53b1

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

solid/lib/AppInfo/Application.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,18 @@ public function __construct(array $urlParams = []) {
4242

4343
// executed in the order that it is registered
4444
$container->registerMiddleware(SolidCorsMiddleware::class);
45+
46+
$container->registerService(SolidWebhookService::class, function($c): SolidWebhookService {
47+
return new SolidWebhookService(
48+
$c->query(SolidWebhookMapper::class)
49+
);
50+
});
51+
52+
$container->registerService(SolidWebhookMapper::class, function($c): SolidWebhookMapper {
53+
return new SolidWebhookMapper(
54+
$c->get(IDBConnection::class)
55+
);
56+
});
4557
}
4658

4759
public function register(IRegistrationContext $context): void {

0 commit comments

Comments
 (0)