Update
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user