Skip to content

Commit

Permalink
Fix typo on request input key (#856)
Browse files Browse the repository at this point in the history
  • Loading branch information
rosalieper authored Aug 8, 2024
1 parent d7c5d96 commit 688272a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# api

## 10x.13.0 - 08 august 2024
- Fix typo in WikiController and test

## 10x.12.0 - 8 August 2024
- Normalise WikiLifecycleEvents

Expand All @@ -13,7 +16,7 @@
- Add Backend for Entity Import Feature T360031

## 10x.9.1 - 23 July 2024
- Created downloadable metric for deleted wikis, which can only be accessed by users with admin privileges
- Created downloadable metric for deleted wikis, which can only be accessed by users with admin privileges
- Test the csv output of DeletedWikiMetricsController
- Add RefreshDatabase or Skip offending tests where these pollute the deleted wiki list

Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/WikiController.php
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ public function delete(Request $request): \Illuminate\Http\JsonResponse

$wikiId = $request->input('wiki');
$userId = $user->id;
$wikiDeletionReason = $request->input('deletionReason');
$wikiDeletionReason = $request->input('deletionReasons');

// Check that the requesting user manages the wiki
if (WikiManager::where('user_id', $userId)->where('wiki_id', $wikiId)->count() !== 1) {
Expand Down
4 changes: 2 additions & 2 deletions tests/Routes/Wiki/DeleteWikiTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ public function testDelete()
->actingAs($user, 'api')
->post(
'wiki/delete',
['wiki' => $wiki->id, 'deletionReason' => 'Some reason for deleting my wiki']
['wiki' => $wiki->id, 'deletionReasons' => 'Some reason for deleting my wiki']
);
// check response is correct
$response->assertStatus(200);

$this->assertSame(
'Some reason for deleting my wiki',
Wiki::withTrashed()->find($wiki->id)->wiki_deletion_reason
Expand Down

0 comments on commit 688272a

Please sign in to comment.