dev@locazia: ui fixes
This commit is contained in:
parent
22b0875634
commit
ebe0d149e0
|
|
@ -14,7 +14,8 @@ async def s_api_v1_content_list(request):
|
||||||
assert store in ('local', 'onchain'), "Invalid store"
|
assert store in ('local', 'onchain'), "Invalid store"
|
||||||
|
|
||||||
content_list = request.ctx.db_session.query(StoredContent).filter(
|
content_list = request.ctx.db_session.query(StoredContent).filter(
|
||||||
StoredContent.type.like(store + '%')
|
StoredContent.type.like(store + '%'),
|
||||||
|
StoredContent.disabled == False
|
||||||
).order_by(StoredContent.created.desc()).offset(offset).limit(limit)
|
).order_by(StoredContent.created.desc()).offset(offset).limit(limit)
|
||||||
make_log("Content", f"Listed {content_list.count()} contents", level='info')
|
make_log("Content", f"Listed {content_list.count()} contents", level='info')
|
||||||
result = {}
|
result = {}
|
||||||
|
|
|
||||||
|
|
@ -53,9 +53,11 @@ class StoredContent(AlchemyBase):
|
||||||
if self.ipfs_cid:
|
if self.ipfs_cid:
|
||||||
extra_fields['ipfs_cid'] = self.ipfs_cid
|
extra_fields['ipfs_cid'] = self.ipfs_cid
|
||||||
if self.type.startswith('local'):
|
if self.type.startswith('local'):
|
||||||
pass
|
extra_fields['filename'] = self.filename
|
||||||
|
extra_fields['encrypted'] = self.encrypted
|
||||||
elif self.type.startswith('onchain'):
|
elif self.type.startswith('onchain'):
|
||||||
extra_fields['onchain_index'] = self.onchain_index
|
extra_fields['onchain_index'] = self.onchain_index
|
||||||
|
extra_fields['owner_address'] = self.owner_address
|
||||||
for k in [
|
for k in [
|
||||||
'item_address', 'license_type',
|
'item_address', 'license_type',
|
||||||
'metadata_cid', 'content_cid', 'cover_cid',
|
'metadata_cid', 'content_cid', 'cover_cid',
|
||||||
|
|
@ -67,5 +69,7 @@ class StoredContent(AlchemyBase):
|
||||||
**extra_fields,
|
**extra_fields,
|
||||||
"hash": self.hash,
|
"hash": self.hash,
|
||||||
"cid": self.cid.serialize_v1(),
|
"cid": self.cid.serialize_v1(),
|
||||||
"status": self.status
|
"status": self.status,
|
||||||
|
"updated": self.updated,
|
||||||
|
"created": self.created,
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue