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
121ad939
Commit
121ad939
authored
Feb 22, 2023
by
Евгений Положенцев
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#167
remove some spaces in rotures/projects.ts
parent
2503a13e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
13 deletions
+4
-13
projects.ts
planner-api/src/routers/projects.ts
+4
-13
No files found.
planner-api/src/routers/projects.ts
View file @
121ad939
...
...
@@ -34,9 +34,7 @@ router.get('/my',auth, async (req:Request, res:Response): Promise<Response>=> {
if
(
rawProjects
.
length
>
0
){
for
(
let
project
of
rawProjects
){
projectIds
.
push
(
project
.
id
)
}
}
)}}
const
projects
=
await
dataSource
.
createQueryBuilder
()
.
from
(
Project
,
"project"
)
...
...
@@ -53,8 +51,6 @@ router.get('/my',auth, async (req:Request, res:Response): Promise<Response>=> {
})
/**create new project */
router
.
post
(
'/'
,
auth
,
async
(
req
:
Request
,
res
:
Response
):
Promise
<
Response
>
=>
{
try
{
...
...
@@ -65,8 +61,7 @@ router.post('/',auth, async (req:Request, res:Response): Promise<Response> => {
.
find
({
where
:{
title
:
title
}
})
}})
if
(
projectCheck
.
length
>
0
)
{
return
res
.
status
(
400
).
send
({
message
:
"suchc Project already exists"
})}
const
member
:
Member
=
new
Member
;
member
.
user
=
user
;
...
...
@@ -105,10 +100,7 @@ try{
where
:{
project
:{
id
:
req
.
params
.
id
}
}
}
)
}}})
return
res
.
send
({
project
,
tasks
})
}
catch
(
e
)
{
return
res
.
status
(
502
).
send
({
message
:(
e
as
Error
).
message
})
...
...
@@ -188,8 +180,7 @@ router.delete('/remove-user/:userId', authAdminProject,async (req: Request, res:
project
:{
id
:
projectId
}
}
})
}})
if
(
!
projectMember
)
return
res
.
status
(
404
).
send
({
message
:
"this member is not present"
})
await
Member
.
delete
({
id
:
projectMember
.
id
})
return
res
.
send
({
message
:
"User removed from project successfully"
})
...
...
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