Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
X
xpub-epmc
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package Registry
Container Registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Literature-services
public-projects
xpub-epmc
Commits
cb1a18f9
Commit
cb1a18f9
authored
6 years ago
by
Nikos Marinos
Browse files
Options
Downloads
Patches
Plain Diff
Addresses #416
parent
57647b58
No related branches found
Branches containing commit
No related tags found
Tags containing commit
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
server/ncbi-integration/publishedCheck.js
+8
-0
8 additions, 0 deletions
server/ncbi-integration/publishedCheck.js
server/xpub-model/entities/manuscript/helpers/transform.js
+1
-1
1 addition, 1 deletion
server/xpub-model/entities/manuscript/helpers/transform.js
with
9 additions
and
1 deletion
server/ncbi-integration/publishedCheck.js
+
8
−
0
View file @
cb1a18f9
...
...
@@ -29,6 +29,9 @@ async function publishedCheck() {
const
manuscript4Db
=
new
Manuscript
(
manuscript
)
delete
manuscript4Db
.
users
await
manuscript4Db
.
save
()
logger
.
info
(
`Status of manuscript
${
manuscript
.
id
}
was changed to 'published'`
,
)
sendEmails
(
manuscript
)
}
}
...
...
@@ -88,6 +91,11 @@ function sendEmails(manuscript) {
user
.
identities
.
filter
(
identity
=>
!
identity
.
deleted
)
.
forEach
(
identity
=>
{
logger
.
info
(
`Emailing
${
identity
.
email
}
about their published manuscript
${
manuscript
.
id
}
.`
,
)
manuscriptHasBeenPublishedEmail
(
identity
.
email
,
`PMC
${
pmcid
}
:
${
manuscript
[
'
meta,title
'
]}
`
,
...
...
This diff is collapsed.
Click to expand it.
server/xpub-model/entities/manuscript/helpers/transform.js
+
1
−
1
View file @
cb1a18f9
...
...
@@ -58,7 +58,7 @@ const gTeams = model =>
// Transform from Database model to GraphQL data
const
gManuscript
=
model
=>
{
const
keys
=
Object
.
keys
(
model
)
const
keys
=
Object
.
keys
(
model
)
.
filter
(
key
=>
model
[
key
])
const
manuscript
=
{}
manuscript
.
meta
=
{}
keys
.
forEach
(
k
=>
{
...
...
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