def retrieve_channel_information(request):
channel_id = request.matchdict['channel_id']
parent_id = '/channels/{}'.format(channel_id)
registrations, count = request.registry.storage.get_all(
collection_id=REGISTRATION_COLLECTION_ID,
parent_id=parent_id)
user_registered = [r for r in registrations if r['id'] == request.prefixed_userid]
if not user_registered:
raise httpexceptions.HTTPForbidden()
return {"data": {
"registrations": count,
"push": 0
}}
# Channel Registration views
评论列表
文章目录