Total Complexity | 3 |
Total Lines | 29 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
14 | final class SettingsController extends AbstractController implements AjaxController |
||
15 | { |
||
16 | private SettingsService $service; |
||
17 | |||
18 | public function __construct(SettingsService $service) |
||
19 | { |
||
20 | $this->service = $service; |
||
21 | } |
||
22 | |||
23 | /** |
||
24 | * @Route("/admin/setting/upload_header_image", methods={"POST"}, name="admin_setting_upload_header_image") |
||
25 | * |
||
26 | * @throws \Exception |
||
27 | */ |
||
28 | public function uploadHeaderImage(Request $request): JsonResponse |
||
29 | { |
||
30 | // Upload custom header image |
||
31 | return $this->service->uploadImage('header_image', $request); |
||
32 | } |
||
33 | |||
34 | /** |
||
35 | * @Route("/admin/setting/upload_logo_image", methods={"POST"}, name="admin_setting_upload_logo_image") |
||
36 | * |
||
37 | * @throws \Exception |
||
38 | */ |
||
39 | public function uploadLogoImage(Request $request): JsonResponse |
||
43 | } |
||
44 | } |
||
45 |