4 * Copyright © 2003-2024 The Galette Team
6 * This file is part of Galette (https://galette.eu).
8 * Galette is free software: you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation, either version 3 of the License, or
11 * (at your option) any later version.
13 * Galette is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with Galette. If not, see <http://www.gnu.org/licenses/>.
22 use Galette\Controllers\AjaxController
;
23 use Galette\Entity\Adherent
;
24 use Galette\Entity\Contribution
;
25 use Galette\Entity\ContributionsTypes
;
26 use Galette\Repository\Members
;
27 use Galette\Filters\MembersList
;
28 use Slim\Routing\RouteCollectorProxy
;
30 $app->group('/ajax', function (RouteCollectorProxy
$app) use ($authenticate) {
33 [AjaxController
::class, 'messages']
34 )->setName('ajaxMessages');
38 [AjaxController
::class, 'photo']
39 )->setName('photoDnd');
42 '/suggest/towns/{term}',
43 [AjaxController
::class, 'suggestTowns']
44 )->setName('suggestTown');
47 '/suggest/countries/{term}',
48 [AjaxController
::class, 'suggestCountries']
49 )->setName('suggestCountry');
52 '/suggest/regions/{term}',
53 [AjaxController
::class, 'suggestRegions']
54 )->setName('suggestRegion');
58 [AjaxController
::class, 'telemetryInfos']
59 )->setName('telemetryInfos')->add($authenticate);
63 [AjaxController
::class, 'telemetrySend']
64 )->setName('telemetrySend')->add($authenticate);
67 '/telemetry/registered',
68 [AjaxController
::class, 'telemetryRegistered']
69 )->setName('setRegistered')->add($authenticate);
72 '/contribution/dates',
73 [AjaxController
::class, 'contributionDates']
74 )->setName('contributionDates')->add($authenticate);
77 '/contribution/members[/{page:\d+}[/{search}]]',
78 [AjaxController
::class, 'contributionMembers']
79 )->setName('contributionMembers')->add($authenticate);
83 [AjaxController
::class, 'passwordStrength']
84 )->setName('checkPassword');