Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typo on request input key #856

Merged
merged 1 commit into from
Aug 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading