Skip to content

Commit 8eaf11c

Browse files
committed
Edit notifications according to schema by Nijmegen
1 parent f1a7474 commit 8eaf11c

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

src/Service/VrijBrpService.php

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,10 @@ public function createStatusNotification(array $data, array $config): array
8888

8989
$now = new DateTime();
9090
$message = [
91-
'kanaal' => 'zaak.status.created',
91+
'kanaal' => 'zaken',
9292
'hoofdObject' => $objectData['zaak'],
93-
'resource' => 'Zaak',
94-
'resourceUrl' => $objectData['zaak'],
93+
'resource' => 'status',
94+
'resourceUrl' => $objectData['url'],
9595
'actie' => 'create',
9696
'aanmaakdatum' => $now->format('c'),
9797
];
@@ -157,15 +157,16 @@ public function createCaseNotification(array $data, array $config): array
157157
$array = $object->toArray(['embedded' => true]);
158158

159159
if (in_array(needle: $array['toelichting'], haystack: ['intra_mun_relocation', 'inter_mun_relocation']) === true) {
160-
$this->extendSync($object, $array);
160+
$object = $this->extendSync($object, $array);
161161
}
162+
$array = $object->toArray(['embedded' => true]);
162163

163164
$now = new DateTime();
164165
$message = [
165-
'kanaal' => 'zaak.created',
166+
'kanaal' => 'zaken',
166167
'hoofdObject' => $object->getUri(),
167-
'resource' => 'Zaak',
168-
'resourceUrl' => $object->getUri(),
168+
'resource' => 'rol',
169+
'resourceUrl' => $array['rollen'][0]['url'],
169170
'actie' => 'create',
170171
'aanmaakdatum' => $now->format('c'),
171172
];

0 commit comments

Comments
 (0)