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
icdp-osg
mdis-datagen
Commits
fe85f1ce
Commit
fe85f1ce
authored
Jul 24, 2020
by
Knut Behrends
Browse files
add 1 more PUT command (update core.oriented
parent
7bd24f9c
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/classes/fake-util.js
View file @
fe85f1ce
...
...
@@ -70,7 +70,7 @@ module.exports = class FakeUtil {
format
=
"
YYYY-MM-DD HH:mm:ss
"
)
{
let
curdate
=
faker
.
date
.
between
(
date1
,
date2
)
return
util
.
format_date
(
curdate
,
format
)
return
this
.
format_date
(
curdate
,
format
)
}
padLeft
(
str
,
n
=
2
,
p
=
"
0
"
)
{
...
...
src/split-inserter.js
View file @
fe85f1ce
...
...
@@ -205,6 +205,23 @@ Core ${options.core_id}: Created A- and W- splits for ${fake_split_promises.len
)
})
}
// finally, set a flag in the core table
let
url
=
`
${
api_url_frag
}
/
${
options
.
core_id
}
?name=core`
let
put_data
=
{
oriented
:
1
,
comments
:
`split
${
util
.
format_date
(
util
.
date_between
(),
"
YYY-MM-DD
"
)}
`
,
}
axutil
.
update_item
(
ax
,
url
,
put_data
,
options
.
core_id
)
.
then
((
updated
)
=>
{
console
.
table
(
{
url
:
url
,
"
'oriented/split' is now:
"
:
updated
?.
data
?.
oriented
},
{
[
`id_
${
updated
?.
data
?.
comments
}
`
]:
updated
?.
data
?.
id
}
)
})
})
})
.
catch
((
error
)
=>
console
.
dir
(
error
,
{
depth
:
0
}))
...
...
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