Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
sun
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
谢林臻
sun
Commits
5a62544c
Commit
5a62544c
authored
Sep 11, 2019
by
yangchenglin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
469cfc43
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
pictorial.py
api/pictorial.py
+4
-2
No files found.
api/pictorial.py
View file @
5a62544c
...
@@ -203,8 +203,9 @@ class PictorialFollowsDel(APIView):
...
@@ -203,8 +203,9 @@ class PictorialFollowsDel(APIView):
"""删除榜单中的关注者"""
"""删除榜单中的关注者"""
def
post
(
self
,
request
):
def
post
(
self
,
request
):
pictorial_id
=
request
.
POST
.
get
(
'pictorial_id'
)
pictorial_id
=
int
(
request
.
POST
.
get
(
'pictorial_id'
,
0
)
)
user_ids
=
json
.
loads
(
request
.
POST
.
get
(
'user_ids'
,
'[]'
))
user_ids
=
json
.
loads
(
request
.
POST
.
get
(
'user_ids'
,
'[]'
))
user_ids
=
[
int
(
item
)
for
item
in
user_ids
]
try
:
try
:
self
.
rpc
[
'venus/sun/pictorial/follows/del'
](
pictorial_id
=
pictorial_id
,
user_ids
=
user_ids
)
.
unwrap
()
self
.
rpc
[
'venus/sun/pictorial/follows/del'
](
pictorial_id
=
pictorial_id
,
user_ids
=
user_ids
)
.
unwrap
()
except
Exception
as
e
:
except
Exception
as
e
:
...
@@ -219,8 +220,9 @@ class PictorialFollowsAdd(APIView):
...
@@ -219,8 +220,9 @@ class PictorialFollowsAdd(APIView):
"""新增榜单中的关注者"""
"""新增榜单中的关注者"""
def
post
(
self
,
request
):
def
post
(
self
,
request
):
pictorial_id
=
request
.
POST
.
get
(
'pictorial_id'
)
pictorial_id
=
int
(
request
.
POST
.
get
(
'pictorial_id'
,
0
)
)
user_ids
=
json
.
loads
(
request
.
POST
.
get
(
'user_ids'
,
'[]'
))
user_ids
=
json
.
loads
(
request
.
POST
.
get
(
'user_ids'
,
'[]'
))
user_ids
=
[
int
(
item
)
for
item
in
user_ids
]
try
:
try
:
self
.
rpc
[
'venus/sun/pictorial/follows/add'
](
pictorial_id
=
pictorial_id
,
user_ids
=
user_ids
)
.
unwrap
()
self
.
rpc
[
'venus/sun/pictorial/follows/add'
](
pictorial_id
=
pictorial_id
,
user_ids
=
user_ids
)
.
unwrap
()
except
Exception
as
e
:
except
Exception
as
e
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment