Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
web-et-numerique
Factory
LLLE_Project
egl-konnector
Commits
a9d572b8
Commit
a9d572b8
authored
Feb 24, 2021
by
Hugo
Browse files
await on hydrate&filter
parent
dec78695
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/index.js
View file @
a9d572b8
...
...
@@ -242,17 +242,19 @@ function reduceMonthFunction(acc, x) {
return
acc
;
}
async
function
storeData
(
data
,
doctype
,
keys
)
{
/**
* Save data in the right doctype db and prevent duplicated keys
*/
async
function
storeData
(
data
,
doctype
,
filterKeys
)
{
log
(
"
debug
"
,
"
Store into
"
+
doctype
);
log
(
"
debug
"
,
"
Store into keys :
"
+
k
eys
);
log
(
"
debug
"
,
"
Store into keys :
"
+
filterK
eys
);
data
.
map
(
v
=>
{
log
(
"
info
"
,
"
Saving data
"
+
v
.
load
+
"
for
"
+
v
.
day
+
"
/
"
+
v
.
month
+
"
/
"
+
v
.
year
);
});
return
hydrateAndFilter
(
data
,
doctype
,
{
keys
:
keys
}).
then
(
filteredDocuments
=>
{
addData
(
filteredDocuments
,
doctype
);
});
const
filteredDocuments
=
await
hydrateAndFilter
(
data
,
doctype
,
{
keys
:
filterKeys
})
return
await
addData
(
filteredDocuments
,
doctype
)
}
/**
...
...
Hugo NOUTS
@hnouts
mentioned in commit
c2d48782
·
Feb 24, 2021
mentioned in commit
c2d48782
mentioned in commit c2d487828ac98c82cd488e0a4964aa01b5306ca1
Toggle commit list
Write
Preview
Supports
Markdown
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!
Cancel
Please
register
or
sign in
to comment