Commit fe85f1ce authored by Knut Behrends's avatar Knut Behrends
Browse files

add 1 more PUT command (update core.oriented

parent 7bd24f9c
......@@ -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") {
......
......@@ -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 }))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment