1 | <?php |
||
16 | class ChangePasswordController extends Controller implements ResponseCodesInterface |
||
17 | { |
||
18 | use JsonApiResponseHelper; |
||
19 | |||
20 | /** |
||
21 | * @SWG\Post(path="/password/change", |
||
22 | * tags={"User actions"}, |
||
23 | * summary="Change user password", |
||
24 | * description="Change user password", |
||
25 | * produces={"application/json"}, |
||
26 | * consumes={"application/json"}, |
||
27 | * @SWG\Parameter( |
||
28 | * in="body", |
||
29 | * name="change password", |
||
30 | * description="JSON Object which change user password", |
||
31 | * required=true, |
||
32 | * @SWG\Schema( |
||
33 | * type="object", |
||
34 | * @SWG\Property(property="current_password", type="string", example="87654321"), |
||
35 | * @SWG\Property(property="password", type="string", example="87654321"), |
||
36 | * @SWG\Property(property="password_confirmation", type="string", example="87654321") |
||
37 | * ) |
||
38 | * ), |
||
39 | * @SWG\Response(response="200", description="Return message") |
||
40 | * ) |
||
41 | */ |
||
42 | |||
43 | public function change(PasswordService $passwordService, Request $request) |
||
61 | |||
62 | /** |
||
63 | * @param array $data |
||
64 | * @return mixed |
||
65 | */ |
||
66 | protected function validator(array $data) |
||
72 | } |
||
73 |