Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
DA-Platform
Overview
Overview
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
文档服务地址:
http://47.92.0.57:3000/
周报索引地址:
http://47.92.0.57:3000/s/NruNXRYmV
Open sidebar
Berlin
DA-Platform
Commits
04bbbd2b
Commit
04bbbd2b
authored
Jun 25, 2020
by
李景熙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加后端删除任务的相关接口
parent
20524ed2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
1 deletion
+14
-1
Task.py
DAPlatform/Dao/Task.py
+1
-1
task.py
DAPlatform/views/task.py
+13
-0
No files found.
DAPlatform/Dao/Task.py
View file @
04bbbd2b
...
@@ -114,7 +114,7 @@ def find_task_by_creator(creator, start, num):
...
@@ -114,7 +114,7 @@ def find_task_by_creator(creator, start, num):
# 删除任务
# 删除任务
def
delete_task
(
task_id
):
def
delete_task
(
task_id
):
try
:
try
:
Task
.
delete
()
.
where
(
Task
.
id
==
task_id
)
Task
.
delete
()
.
where
(
Task
.
task_id
==
task_id
)
.
execute
(
)
except
:
except
:
return
Result
(
0
,
"delete failed"
,
{},
0
)
return
Result
(
0
,
"delete failed"
,
{},
0
)
else
:
else
:
...
...
DAPlatform/views/task.py
View file @
04bbbd2b
...
@@ -60,3 +60,15 @@ def create_task():
...
@@ -60,3 +60,15 @@ def create_task():
}
}
return
json
.
dumps
(
res
)
return
json
.
dumps
(
res
)
@task.route
(
"/deleteTask"
,
methods
=
[
"GET"
])
def
delete_task
():
taskId
=
request
.
args
[
'taskId'
]
print
(
taskId
)
ret
=
Task
.
delete_task
(
taskId
)
res
=
{
'code'
:
ret
.
code
,
'message'
:
ret
.
message
,
'data'
:
ret
.
data
}
return
json
.
dumps
(
res
)
\ No newline at end of file
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