Commit 8a423bed authored by 王浩's avatar 王浩

batch create topic tag is_own

parent ee1eaf07
......@@ -19,4 +19,5 @@ urlpatterns = [
# user
url(r'^v1/user/shadow/list$', user.ShadowUserList.as_view(), name='create_tag_for_batch'),
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$'),
]
......@@ -22,7 +22,6 @@ class CreateTagForBatch(BaseView):
tags.append(tag)
else:
tags = tag_list
error, data = self.call_rpc('venus/community/tag/batch_create_not_classify', data=tags)
if error:
......
......@@ -65,7 +65,7 @@ class CreateTopicForBatch(BaseView):
# 先创建标签
_tag_error, _tag_data = self.call_rpc(
"venus/community/tag/batch_create_tag_by_name",
tag_names=tags
tag_names=tags, is_own=1
)
if _tag_error:
return self.error(_tag_error)
......
......@@ -59,3 +59,21 @@ class Validate3PartyAccount(BaseView):
return self.error(err)
data = {account_id: _data.get(account_id, False) for account_id in account_ids}
return self.ok(data=data)
class BatchCreateShadowUser(BaseView):
"""
批量创建马甲用户
"""
def post(self, request):
request_data = json.loads(request.POST.get('ins_data', '[]'))
print(request_data)
err, _data = self.call_rpc(
"venus/community/user/batch_create_shadow_user",
data=request_data
)
if err:
return self.error(err)
return self.ok(data=_data)
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