Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
planner-team-one
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
21
Issues
21
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
Евгений Положенцев
planner-team-one
Commits
57423f71
Commit
57423f71
authored
Nov 25, 2022
by
Евгений Положенцев
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#63
added router/projects/projectId delete request
parent
475800e8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
0 deletions
+14
-0
members.ts
planner-api/src/routers/members.ts
+1
-0
projects.ts
planner-api/src/routers/projects.ts
+13
-0
No files found.
planner-api/src/routers/members.ts
0 → 100644
View file @
57423f71
import
{
Member
}
from
"../models/Member"
;
\ No newline at end of file
planner-api/src/routers/projects.ts
View file @
57423f71
...
@@ -96,6 +96,19 @@ router.get("/:id",async (req:Request, res:Response): Promise<Response> => {
...
@@ -96,6 +96,19 @@ router.get("/:id",async (req:Request, res:Response): Promise<Response> => {
})
})
router
.
delete
(
'/:projectId'
,
async
(
req
:
Request
,
res
:
Response
):
Promise
<
Response
>=>
{
const
projectId
=
req
.
params
.
projectId
;
await
myDataSource
.
createQueryBuilder
()
.
delete
()
.
from
(
Project
)
.
where
(
"id = :id"
,
{
id
:
projectId
})
.
execute
()
return
res
.
send
({
message
:
'Project deleted successfully'
})
})
router
.
get
(
'/user/:userId'
,
async
(
req
:
Request
,
res
:
Response
):
Promise
<
Response
>=>
{
router
.
get
(
'/user/:userId'
,
async
(
req
:
Request
,
res
:
Response
):
Promise
<
Response
>=>
{
const
userId
:
string
=
req
.
params
.
userId
const
userId
:
string
=
req
.
params
.
userId
const
userProjects
=
await
dataSource
const
userProjects
=
await
dataSource
...
...
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