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
13f36757
Commit
13f36757
authored
Apr 04, 2019
by
王浩
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'haow/new' into 'master'
alpha 1.6 临时上线 See merge request
alpha/sun!168
parents
a6c2dcb9
d3c83e0c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
tag.py
api/tag.py
+5
-5
topic.py
api/topic.py
+2
-0
No files found.
api/tag.py
View file @
13f36757
...
...
@@ -54,15 +54,15 @@ class TagUpdateOrCreateView(APIView):
tagtypes
=
list
(
set
(
map
(
lambda
x
:
x
.
split
(
":"
)[
0
],
json
.
loads
((
request
.
POST
.
get
(
'tagtypes'
,
'[]'
))))))
data
=
{
'name'
:
request
.
POST
.
get
(
'name'
)
.
lower
(),
'description'
:
request
.
POST
.
get
(
'description'
),
'description'
:
request
.
POST
.
get
(
'description'
,
''
),
'down_tags'
:
down_tags
,
'up_tags'
:
up_tags
,
'tagtypes'
:
tagtypes
,
'icon_url'
:
request
.
POST
.
get
(
'icon_url'
,
''
)[:
-
2
],
'platform'
:
request
.
POST
.
get
(
'platform'
),
'collection'
:
request
.
POST
.
get
(
'collection'
),
'alias'
:
request
.
POST
.
get
(
'alias'
),
'is_show_in_register'
:
request
.
POST
.
get
(
'is_show_in_register'
)
'platform'
:
request
.
POST
.
get
(
'platform'
,
1
),
'collection'
:
request
.
POST
.
get
(
'collection'
,
0
),
'alias'
:
request
.
POST
.
get
(
'alias'
,
''
),
'is_show_in_register'
:
request
.
POST
.
get
(
'is_show_in_register'
,
'false'
)
}
try
:
data
=
self
.
rpc
[
'venus/sun/tag/edit'
](
id
=
id
,
data
=
data
)
.
unwrap
()
...
...
api/topic.py
View file @
13f36757
...
...
@@ -129,6 +129,8 @@ class TopicUpdateOrCreateView(APIView):
'drop_score'
:
int
(
request
.
POST
.
get
(
'drop_score'
)),
'has_image'
:
1
if
topic_images
else
0
,
'has_video'
:
1
if
request
.
POST
.
get
(
'video_url'
,
''
)
else
0
,
'virtual_vote_num'
:
request
.
POST
.
get
(
'virtual_vote_num'
,
''
),
}
try
:
self
.
rpc
[
'venus/sun/topic/edit'
](
id
=
id
,
data
=
data
)
.
unwrap
()
...
...
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