| @@ 46-55 (lines=10) @@ | ||
| 43 | * @see |
|
| 44 | * @since |
|
| 45 | */ |
|
| 46 | public static function create() |
|
| 47 | { |
|
| 48 | return [RouteInterface::METHOD_KEY => RouteInterface::POST_METHOD, |
|
| 49 | RouteInterface::ENDPOINT_KEY => Page::root(), |
|
| 50 | RouteInterface::PARAMS_KEY => [ |
|
| 51 | 'name', |
|
| 52 | 'description', |
|
| 53 | 'amount' ] |
|
| 54 | ]; |
|
| 55 | } |
|
| 56 | /* |
|
| 57 | Get page |
|
| 58 | */ |
|
| @@ 113-121 (lines=9) @@ | ||
| 110 | * @see |
|
| 111 | * @since |
|
| 112 | */ |
|
| 113 | public static function update() |
|
| 114 | { |
|
| 115 | return [RouteInterface::METHOD_KEY => RouteInterface::PUT_METHOD, |
|
| 116 | RouteInterface::ENDPOINT_KEY => Page::root() . '/{id}', |
|
| 117 | RouteInterface::PARAMS_KEY => [ |
|
| 118 | 'name', |
|
| 119 | 'description' ], |
|
| 120 | RouteInterface::ARGS_KEY => ['id' ] ]; |
|
| 121 | } |
|
| 122 | } |
|
| 123 | ||