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
e987d3cb
Commit
e987d3cb
authored
6 years ago
by
Yuci Gou
Browse files
Options
Downloads
Plain Diff
Merge branch 'shared-data-model' of gitlab.coko.foundation:xpub/xpub-epmc into shared-data-model
parents
af55c336
28913bb2
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!90
Dev
,
!89
Shared data model
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 @
e987d3cb
...
...
@@ -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 @
e987d3cb
...
...
@@ -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