Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
X
xpub-faraday
Manage
Activity
Members
Labels
Plan
Issues
2
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Container Registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
xpub
xpub-faraday
Commits
c64f1e61
Commit
c64f1e61
authored
6 years ago
by
Tania Fecheta
Browse files
Options
Downloads
Patches
Plain Diff
refactor(collection/patch): remove duplcate code and unnecesary code
parent
26eda51d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
3 merge requests
!222
Sprint #26
,
!217
Sprint #26
,
!198
Hin 1166 admin delete manuscript
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
packages/component-manuscript-manager/src/routes/collections/patch.js
+3
-6
3 additions, 6 deletions
...ponent-manuscript-manager/src/routes/collections/patch.js
with
3 additions
and
6 deletions
packages/component-manuscript-manager/src/routes/collections/patch.js
+
3
−
6
View file @
c64f1e61
...
...
@@ -35,12 +35,9 @@ module.exports = models => async (req, res) => {
})
}
if
(
collectionStatus
)
{
collection
.
status
=
'
deleted
'
await
collection
.
save
()
const
collectionHelper
=
new
Collection
({
collection
})
collectionHelper
.
updateStatus
({
newStatus
:
'
deleted
'
})
}
const
collectionHelper
=
new
Collection
({
collection
})
await
collectionHelper
.
updateStatus
({
newStatus
:
'
deleted
'
})
return
res
.
status
(
200
).
json
(
collection
)
}
catch
(
e
)
{
const
notFoundError
=
await
services
.
handleNotFoundError
(
e
,
'
Collection
'
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment