mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
OpenAPI Docs and additional password protection on self update route: (#3320)
This commit is contained in:
parent
3a76d8bc34
commit
f04f2b15fd
@ -23,6 +23,38 @@ class SelfUpdateController extends BaseController
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @OA\Post(
|
||||||
|
* path="/api/v1/self-update",
|
||||||
|
* operationId="selfUpdate",
|
||||||
|
* tags={"update"},
|
||||||
|
* summary="Performs a system update",
|
||||||
|
* description="Performs a system update",
|
||||||
|
* @OA\Parameter(ref="#/components/parameters/X-Api-Secret"),
|
||||||
|
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
|
||||||
|
* @OA\Parameter(ref="#/components/parameters/X-Api-Password"),
|
||||||
|
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
|
||||||
|
* @OA\Parameter(ref="#/components/parameters/include"),
|
||||||
|
* @OA\Response(
|
||||||
|
* response=200,
|
||||||
|
* description="Success/failure response"
|
||||||
|
* ),
|
||||||
|
* @OA\Response(
|
||||||
|
* response=422,
|
||||||
|
* description="Validation error",
|
||||||
|
* @OA\JsonContent(ref="#/components/schemas/ValidationError"),
|
||||||
|
*
|
||||||
|
* ),
|
||||||
|
* @OA\Response(
|
||||||
|
* response="default",
|
||||||
|
* description="Unexpected Error",
|
||||||
|
* @OA\JsonContent(ref="#/components/schemas/Error"),
|
||||||
|
* ),
|
||||||
|
* )
|
||||||
|
*
|
||||||
|
*/
|
||||||
public function update(UpdaterManager $updater)
|
public function update(UpdaterManager $updater)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -112,7 +112,7 @@ Route::group(['middleware' => ['api_db', 'token_auth', 'locale'], 'prefix' => 'a
|
|||||||
|
|
||||||
Route::post('templates', 'TemplateController@show')->name('templates.show');
|
Route::post('templates', 'TemplateController@show')->name('templates.show');
|
||||||
|
|
||||||
Route::post('self-update', 'SelfUpdateController@update');
|
Route::post('self-update', 'SelfUpdateController@update')->middleware('password_protected');
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Route::resource('tasks', 'TaskController'); // name = (tasks. index / create / show / update / destroy / edit
|
Route::resource('tasks', 'TaskController'); // name = (tasks. index / create / show / update / destroy / edit
|
||||||
|
Loading…
x
Reference in New Issue
Block a user