dev@locazia: debug print
This commit is contained in:
parent
22f6d116ce
commit
27b093bc07
|
|
@ -1,6 +1,7 @@
|
|||
from sanic import response
|
||||
from datetime import datetime, timedelta
|
||||
from app.core.models.node_storage import StoredContent
|
||||
from app.core.logger import make_log
|
||||
|
||||
|
||||
async def s_api_v1_content_list(request):
|
||||
|
|
@ -11,9 +12,10 @@ async def s_api_v1_content_list(request):
|
|||
|
||||
content_list = request.ctx.db_session.query(StoredContent).filter(
|
||||
StoredContent.type == 'local/content_bin'
|
||||
).order_by(StoredContent.created.desc()).offset(offset).limit(limit).all()
|
||||
).order_by(StoredContent.created.desc()).offset(offset).limit(limit)
|
||||
make_log("Content", f"Listed {content_list.count()} contents", level='info')
|
||||
result = {}
|
||||
for content in content_list:
|
||||
for content in content_list.all():
|
||||
content_json = content.json_format()
|
||||
result[content_json["cid"]] = content_json
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue