Skip to content

Commit d141383

Browse files
committed
fix for update member
1 parent f4b4a1f commit d141383

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Gate/InitiativeApiGate.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,14 +187,14 @@ public function removeMember($request, $response, $params)
187187
// PATCH /initiatives/{ini}/members/{usr}
188188
public function updateMember($request, $response, $params)
189189
{
190-
$result = $this->resources['initiative']->removeMember(
190+
$result = $this->resources['initiative']->updateMember(
191191
$request->getAttribute('subject'),
192192
Utils::sanitizedIdParam('ini', $params),
193193
Utils::sanitizedIdParam('usr', $params),
194194
$this->helper->getDataFromRequest($request)
195195
);
196196
return $this->sendSimpleResponse($response, 'Member updated', 200, [
197-
'removed' => $result
197+
'updated' => $result
198198
]);
199199
}
200200

src/Resource/InitiativeResource.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,7 @@ public function updateMember($subject, $iniId, $subId, $data, $flags = 3)
559559
->findOrFail($subId);
560560
if ($flags & Utils::AUTHFLAG) {
561561
$this->authorization->checkOrFail(
562-
$subject, 'updateInitiativeMember', $user
562+
$subject, 'updateInitiativeMember', $init
563563
);
564564
}
565565
$schema = [

0 commit comments

Comments
 (0)