Interim update

This commit is contained in:
a-ill
2023-07-30 13:04:15 +03:00
parent 9051fa90f3
commit 7c9bb1e830
111 changed files with 25589 additions and 170 deletions

View File

@@ -1,9 +1,10 @@
module GroupsController
using Genie, Genie.Renderer, Genie.Renderer.Html, Genie.Requests
using Genie, Genie.Renderer, Genie.Renderer.Html, Genie.Requests, GenieAuthentication
using JSON3
using SearchLight
using Server.DatabaseSupport, Server.TemplateEditor
import Server.DatabaseSupport: select_from_table
controller = "groups"
dict_layouts = Dict(
@@ -56,4 +57,13 @@ function groups_add_post()
insert_into_table("groups_requests",data)
end
function get_user_groups()
user_id = get_authentication()
data = select_from_table("groups" => ["*"],
where_data = ["user_id" => user_id])
ns = names(data)
data_dict = map(x -> Dict(zip(ns,values(x))),eachrow(data))
return JSON3.write(data_dict)
end
end