better get example
This commit is contained in:
parent
b048f1bad3
commit
be0739614d
|
@ -66,7 +66,11 @@ async def get(request):
|
||||||
all_objects = await objects.execute(KeyValue.select())
|
all_objects = await objects.execute(KeyValue.select())
|
||||||
serialized_obj = []
|
serialized_obj = []
|
||||||
for obj in all_objects:
|
for obj in all_objects:
|
||||||
serialized_obj.append({obj.key: obj.text})
|
serialized_obj.append({
|
||||||
|
'id': obj.id,
|
||||||
|
'key': obj.key,
|
||||||
|
'value': obj.text}
|
||||||
|
)
|
||||||
|
|
||||||
return json({'objects': serialized_obj})
|
return json({'objects': serialized_obj})
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user