This commit is contained in:
a-ill
2023-07-21 17:38:02 +03:00
parent fb705bab7c
commit ccd97c1095
12 changed files with 121 additions and 19 deletions

View File

@@ -212,10 +212,34 @@ function political_compass()
end
function groups_add_post()
data = collect(JSON3.read(rawpayload()))
push!(data,1)
dict = Dict(zip(["country","state","town","latitude","longitude","contact","members"],data))
insert_into_table("groups",dict)
data = jsonpayload()
insert_into_table("groups",data)
end
#=
function compile_groups()
function table_to_json(name,t)
ar = []
for df_row in eachrow(t)
df_row = first(eachrow(df))
id = :town
location = String[]
for id in [:country,:state,:town]
if !isempty(df_row[id])
push!(location,df_row[id])
end
end
df = select_from_table(["groups" => ["*"]])
dict = Dict(
"location" => [location,[df_row[:latitude],df_row[:longitude]]],
"members" => df_row[:members],
"contact" => df_row[:contact]
)
end
return ar
end
df = select_from_table(["groups" => ["*"]])
end
end
=#
end