Commit 348c366c authored by Davve's avatar Davve

完善推送

parent f52d7227
......@@ -82,7 +82,7 @@ class GroupRelatedUser(APIView):
count = int(request.GET.get('limit', 10))
filters = {'group_id': id}
try:
data = self.rpc['venus/sun/group/user/list'](filters=filters, offset=offset, limit=count).unwrap()
data = self.rpc['venus/sun/group/user/list'](filters=filters, offset=(offset - 1) * count, limit=count).unwrap()
except Exception as e:
raise e
return data
......
......@@ -32,9 +32,11 @@ class PushUpdateOrCreateView(APIView):
id = request.POST.get('id', '')
creator_id = request.POST.get('creator_id')
push_time = analysis_time(request.POST.get('push_time', 0))
group_topic_id = request.POST.get('group_topic_id', '')
full_url = request.POST.get('url', '') + group_topic_id
data = {
'url': request.POST.get('url', ''),
'url': full_url,
'push_time': push_time,
'icon': request.POST.get('icon', '')[:-2],
'content': request.POST.get('content', ''),
......
......@@ -52,6 +52,7 @@ class TopicUpdateOrCreateView(APIView):
'user_id': request.POST.get('user', '').split(':')[0],
'star_id': request.POST.get('star', '').split(':')[0],
'tag_ids': tag_ids,
'is_online': int(request.POST.get('is_online')),
}
try:
self.rpc['venus/sun/topic/edit'](id=id, data=data).unwrap()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment