Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
U
unify_api2
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
chaonan
unify_api2
Commits
b68392cd
Commit
b68392cd
authored
Mar 11, 2024
by
ZZH
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix revise news 2024-03-11
parent
3e3b3681
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
new_mgr.py
unify_api/modules/qkadmin/views/new_mgr.py
+8
-4
No files found.
unify_api/modules/qkadmin/views/new_mgr.py
View file @
b68392cd
...
...
@@ -36,12 +36,16 @@ async def post_publish_news(request, *args, **kwargs) -> SuccessRsp:
@
summary
(
"重新编辑文章(标题|内容|封面|文章分类|发布时间|关键词|描述)"
)
async
def
post_revise_news
(
request
,
body
:
ReviseNewsReq
)
->
SuccessRsp
:
async
def
post_revise_news
(
request
,
*
args
,
**
kwargs
)
->
SuccessRsp
:
is_success
,
url_article
,
url_cover
=
await
upload_news_qs
(
request
)
if
is_success
:
d_news_info
=
dict
(
title
=
body
.
title
,
pub_time
=
body
.
pub_time
,
keywords
=
body
.
keywords
,
contents
=
body
.
contents
,
news_type
=
int
(
body
.
news_type
))
form
=
request
.
form
d_news_info
=
dict
(
news_id
=
form
.
get
(
"news_id"
),
title
=
form
.
get
(
"title"
),
pub_time
=
form
.
get
(
"pub_time"
),
keywords
=
form
.
get
(
"keywords"
),
contents
=
form
.
get
(
"contents"
),
news_type
=
int
(
form
.
get
(
"news_type"
)))
await
update_news_info
(
d_news_info
,
url_article
,
url_cover
)
return
SuccessRsp
(
success
=
1
,
message
=
"修改文章成功"
)
...
...
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