From a6f0d824574e603eb48cc7357f01419c81140b32 Mon Sep 17 00:00:00 2001 From: a-ill Date: Wed, 2 Aug 2023 18:15:02 +0300 Subject: [PATCH] Added group compilations --- Server/app/resources/groups/GroupsController.jl | 4 ++++ Server/routes.jl | 2 -- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Server/app/resources/groups/GroupsController.jl b/Server/app/resources/groups/GroupsController.jl index 63cc79b..9135e7e 100644 --- a/Server/app/resources/groups/GroupsController.jl +++ b/Server/app/resources/groups/GroupsController.jl @@ -232,6 +232,7 @@ function approve_request() update_table("groups_requests",Dict("status" => 1), where_data=["group_id" => group_id, "user_id" => data["user_id"]]) dict_users_groups = Dict("user_id" => data["user_id"], "group_id" => group_id) insert_into_table("users_groups",dict_users_groups) + compile("groups") return nothing end @@ -256,6 +257,7 @@ function add_verified_groups() dict_users_groups = Dict("user_id" => user_id, "group_id" => group_id) insert_into_table("users_groups",dict_users_groups) delete_from_table("groups_requests",["user_id" => user_id]) + compile("groups") end function changeMemberCount() @@ -264,6 +266,7 @@ function changeMemberCount() group_id = isempty(groups_ids) ? nothing : groups_ids[1] data = copy(jsonpayload()) update_table("groups",data, where_data=["id" => group_id]) + compile("groups") end function change_group() @@ -281,6 +284,7 @@ function change_group() end if !isempty(data_new) update_table("groups",data_new, where_data=["id" => group_id]) + compile("groups") end end return nothing diff --git a/Server/routes.jl b/Server/routes.jl index 0bdbf67..cf1d251 100644 --- a/Server/routes.jl +++ b/Server/routes.jl @@ -56,8 +56,6 @@ route("/:locale/group-change/*", GroupsController.change_group, method = POST, n route("/:locale/add-verified-groups/*", GroupsController.add_verified_groups, named = :add_verified_groups) -route("/:locale/add-verified-groups/*", GroupsController.add_verified_groups, named = :add_verified_groups) - #---Coops---------------------------------------------------------- route("/:locale/cooperatives/*", CooperativesController.cooperatives, named = :cooperatives)