Commit cdd2e754 authored by 王浩's avatar 王浩

Merge branch 'haow/dev' into 'test'

Haow/dev

See merge request alpha/saturn!44
parents 89891280 2cac4681
...@@ -4,6 +4,8 @@ from django.conf.urls import url ...@@ -4,6 +4,8 @@ from django.conf.urls import url
from .views import user from .views import user
from .views import topic from .views import topic
from .views import tag from .views import tag
from .views import reply
urlpatterns = [ urlpatterns = [
# grasp # grasp
...@@ -22,4 +24,7 @@ urlpatterns = [ ...@@ -22,4 +24,7 @@ urlpatterns = [
url(r'^v1/validate_3party_account$', user.Validate3PartyAccount.as_view(), name='validate_3party_account$'), url(r'^v1/validate_3party_account$', user.Validate3PartyAccount.as_view(), name='validate_3party_account$'),
url(r'^v1/user/batch_create_shadow_user$', user.BatchCreateShadowUser.as_view(), name='batch_create_shadow_user$'), url(r'^v1/user/batch_create_shadow_user$', user.BatchCreateShadowUser.as_view(), name='batch_create_shadow_user$'),
url(r'^v1/user/batch_update_user_level_fans$', user.BatchUpdateUserLevelFansNum.as_view(), name='batch_update_user_level_fans$'), url(r'^v1/user/batch_update_user_level_fans$', user.BatchUpdateUserLevelFansNum.as_view(), name='batch_update_user_level_fans$'),
# reply
url(r'^v1/reply/create_for_inner$', reply.CreateReplyForInner.as_view(), name='create_reply_for_inner'),
] ]
import json
from api.views.base_view import BaseView
class CreateReplyForInner(BaseView):
"""
内部使用,创建评论回复
"""
def post(self, request):
user_id = request.POST.get('user_id')
topic_id = request.POST.get('topic_id')
content = request.POST.get('content', '')
replied_id = request.POST.get('replied_id')
error, data = self.call_rpc('venus/community/reply/for_inner_create', user_id=user_id, topic_id=topic_id, content=content, replied_id=replied_id)
if error:
return self.error(error)
return self.ok(data=data)
...@@ -110,7 +110,7 @@ class CreateTopicForBatch(BaseView): ...@@ -110,7 +110,7 @@ class CreateTopicForBatch(BaseView):
) )
if _tag_error: if _tag_error:
return self.error(_tag_error) return self.error(_tag_error)
_tag_data.extend(location_tags) _tag_data.update(location_tags)
# 更新发帖 # 更新发帖
# 处理标签,将文本中的标签处理成现有标签 # 处理标签,将文本中的标签处理成现有标签
......
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