2023-06-15 01:41:54 +07:00
|
|
|
|
2023-07-30 17:04:15 +07:00
|
|
|
using Genie.Router, Genie.Requests, Genie.Renderer.Json, JSON3, GenieAuthentication
|
2023-08-01 19:56:41 +07:00
|
|
|
using Server.GroupsController
|
2023-06-15 01:41:54 +07:00
|
|
|
|
|
|
|
#---Basic-----------------------------------------------------------
|
|
|
|
|
2023-07-28 21:49:29 +07:00
|
|
|
route("/:locale/*", BasicController.landing, named = :landing)
|
|
|
|
|
2023-07-06 18:04:03 +07:00
|
|
|
route("/:locale/manifesto/*", BasicController.manifesto, named = :manifest)
|
2023-06-24 04:39:41 +07:00
|
|
|
|
2023-07-06 18:04:03 +07:00
|
|
|
route("/:locale/join-us/*", BasicController.join_us, named = :join_us)
|
2023-06-24 04:39:41 +07:00
|
|
|
|
2023-07-28 21:49:29 +07:00
|
|
|
route("/:locale/political-compass/*", BasicController.political_compass, named = :political_compass)
|
2023-06-24 04:39:41 +07:00
|
|
|
|
2023-07-30 17:04:15 +07:00
|
|
|
#---Authentication and such------------------------------------------
|
|
|
|
|
|
|
|
route("/:locale/auth/*", AuthenticationController.auth, named = :auth)
|
|
|
|
|
|
|
|
route("/:locale/check-login", authenticated, named=:checklogin)
|
|
|
|
|
|
|
|
route("/:locale/login-post", AuthenticationController.login, method = POST)
|
|
|
|
|
|
|
|
route("/:locale/logout", AuthenticationController.logout)
|
|
|
|
|
|
|
|
route("/:locale/signup-post", AuthenticationController.register, method = POST)
|
|
|
|
|
|
|
|
route("/:locale/signup-google", AuthenticationController.register_google, method = POST)
|
|
|
|
|
|
|
|
route("/:locale/change-user", AuthenticationController.change_user, method = POST)
|
|
|
|
|
|
|
|
route("/:locale/get-user", AuthenticationController.get_user)
|
|
|
|
|
|
|
|
route("/:locale/confirm-email", AuthenticationController.confirm_email, method = POST)
|
|
|
|
|
|
|
|
route("/:locale/email-confirmation", AuthenticationController.email_confirmation, named = :email_confirmation)
|
|
|
|
|
|
|
|
route("/:locale/profile", AuthenticationController.profile, named = :profile)
|
|
|
|
|
2023-07-28 21:49:29 +07:00
|
|
|
#---Groups----------------------------------------------------------
|
2023-07-20 04:15:12 +07:00
|
|
|
|
2023-07-28 21:49:29 +07:00
|
|
|
route("/:locale/groups/*", GroupsController.groups, named = :groups)
|
2023-07-20 04:15:12 +07:00
|
|
|
|
2023-07-28 21:49:29 +07:00
|
|
|
route("/:locale/groups-add/*", GroupsController.groups_add, named = :groups_add)
|
2023-06-24 04:39:41 +07:00
|
|
|
|
2023-07-28 21:49:29 +07:00
|
|
|
route("/:locale/groups-add-post/*", GroupsController.groups_add_post, method = POST, named = :groups_add_post)
|
2023-07-13 01:25:28 +07:00
|
|
|
|
2023-08-01 19:56:41 +07:00
|
|
|
route("/:locale/get-user-groups/*", GroupsController.get_user_groups, named = :get_user_groups)
|
|
|
|
|
|
|
|
route("/:locale/get-group-requests/*", GroupsController.get_group_requests, named = :get_group_requests)
|
|
|
|
|
|
|
|
route("/:locale/group-approve-request/*", GroupsController.approve_request, method = POST, named = :group_approve_request)
|
|
|
|
|
|
|
|
route("/:locale/group-reject-request/*", GroupsController.reject_request, method = POST, named = :group_reject_request)
|
|
|
|
|
|
|
|
route("/:locale/add-verified-groups/*", GroupsController.add_verified_groups, named = :add_verified_groups)
|
2023-07-30 17:04:15 +07:00
|
|
|
|
2023-07-28 21:49:29 +07:00
|
|
|
#---Coops----------------------------------------------------------
|
2023-06-24 04:39:41 +07:00
|
|
|
|
2023-07-28 21:49:29 +07:00
|
|
|
route("/:locale/cooperatives/*", CooperativesController.cooperatives, named = :cooperatives)
|
2023-07-04 23:21:15 +07:00
|
|
|
|
2023-07-28 21:49:29 +07:00
|
|
|
route("/:locale/cooperatives-add/*", CooperativesController.cooperatives_add, named = :cooperatives_add)
|
2023-06-26 00:39:06 +07:00
|
|
|
|
2023-07-28 21:49:29 +07:00
|
|
|
route("/:locale/cooperatives-add-post/*", CooperativesController.cooperatives_add_post, method = POST, named = :cooperatives_add_post)
|
|
|
|
|
|
|
|
#---Communes----------------------------------------------------------
|
|
|
|
|
|
|
|
route("/:locale/communes/*", CommunesController.communes, named = :communes)
|
|
|
|
|
|
|
|
route("/:locale/communes-add/*", CommunesController.communes_add, named = :communes_add)
|
|
|
|
|
|
|
|
route("/:locale/communes-add-post/*", CommunesController.communes_add_post, method = POST, named = :communes_add_post)
|
|
|
|
|
|
|
|
#---Parties----------------------------------------------------------
|
|
|
|
|
|
|
|
route("/:locale/parties/*", PartiesController.parties, named = :parties)
|
|
|
|
|
|
|
|
route("/:locale/parties-add/*", PartiesController.parties_add, named = :parties_add)
|
|
|
|
|
|
|
|
route("/:locale/parties-add-post/*", PartiesController.parties_add_post, method = POST, named = :parties_add_post)
|
|
|
|
|
|
|
|
#---Partners---------------------------------------------------------
|
|
|
|
|
|
|
|
route("/:locale/partners/*", PartnersController.partners, named = :partners)
|
|
|
|
|
|
|
|
route("/:locale/partners-add/*", PartnersController.partners_add, named = :partners_add)
|
|
|
|
|
|
|
|
route("/:locale/partners-add-post/*", PartnersController.partners_add_post, method = POST, named = :partners_add_post)
|