-
Notifications
You must be signed in to change notification settings - Fork 3
feat: add backend endpoint to set wiki DB version #1012
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
Conversation
tarrow
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally looks very good; easy to review. I think there's probably one important bit of test missing though.
| $router->get('getWikiHostsForDomain', ['uses' => 'MediaWikiHostsController@getWikiHostsForDomain']); | ||
|
|
||
| // PUT | ||
| $router->put('setWikiDbVersion', ['uses' => 'WikiDbVersionController@updateWikiDbVersion']); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's good this isn't in wiki on second thoughts because it's actually about changing WikiDbs not Wikis
|
|
||
| public function updateWikiDbVersion(Request $request): \Illuminate\Http\JsonResponse { | ||
| $validated = $request->validate([ | ||
| 'domain' => 'required|string', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this light validation; I think we don't want to reuse the domain validation logic from Wiki creation because overtime it may become stricter and then requests here might start failing.
successor of #1010
Adds the backend endpoint
/backend/setWikiDbVersionas defined in https://phabricator.wikimedia.org/T410394