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
f471455c
Commit
f471455c
authored
6 years ago
by
MoSelim
Browse files
Options
Downloads
Patches
Plain Diff
use data-access to destroy connections
parent
48e086dc
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!116
Shared data model
,
!117
Dev
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
server/privacyNotice/privacyNoticeCheck.js
+7
-3
7 additions, 3 deletions
server/privacyNotice/privacyNoticeCheck.js
server/xpub-model/entities/privacyNotice/index.js
+1
-0
1 addition, 0 deletions
server/xpub-model/entities/privacyNotice/index.js
with
8 additions
and
3 deletions
server/privacyNotice/privacyNoticeCheck.js
+
7
−
3
View file @
f471455c
const
https
=
require
(
'
https
'
)
const
PrivacyNotice
Manager
=
require
(
'
../xpub-model/entities/privacyNotice
'
)
const
PrivacyNotice
=
require
(
'
../xpub-model/entities/privacyNotice
/data-access
'
)
const
privacyNoticeCheck
=
()
=>
{
PrivacyNotice
Manager
.
find
LastVersion
().
then
(
privacyNotice
=>
{
PrivacyNotice
.
select
LastVersion
().
then
(
privacyNotice
=>
{
getLatestVersion
().
then
(
data
=>
{
const
privacyNotesData
=
data
.
nodes
[
0
].
node
if
(
privacyNotesData
[
'
version Count
'
]
!==
privacyNotice
.
version
)
{
...
...
@@ -13,7 +13,11 @@ const privacyNoticeCheck = () => {
privacyNotesData
.
changed
.
split
(
'
-
'
)[
0
].
trim
(),
),
}
PrivacyNoticeManager
.
save
(
latestPrivacyNotice
)
PrivacyNotice
.
insert
(
latestPrivacyNotice
).
then
(()
=>
PrivacyNotice
.
knex
().
destroy
(),
)
}
else
{
PrivacyNotice
.
knex
().
destroy
()
}
})
})
...
...
This diff is collapsed.
Click to expand it.
server/xpub-model/entities/privacyNotice/index.js
+
1
−
0
View file @
f471455c
...
...
@@ -26,6 +26,7 @@ const PrivacyNoticeManager = {
return
{
...
privacyNotice
,
id
}
},
findLastVersion
:
async
()
=>
PrivacyNotice
.
selectLastVersion
(),
model
:
PrivacyNotice
,
}
module
.
exports
=
PrivacyNoticeManager
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