mirror of
https://github.com/bellingcat/datasheet-server.git
synced 2026-06-11 12:58:32 +03:00
add basic hbs view
This commit is contained in:
@@ -19,13 +19,19 @@ class Controller {
|
||||
).reduce((acc, curr) => acc.concat(curr))
|
||||
}
|
||||
|
||||
rebuildBlueprintsAsync () {
|
||||
Object.values(this.fetchers).forEach(t => t._buildBlueprintsAsync())
|
||||
}
|
||||
|
||||
update () {
|
||||
const me = this
|
||||
return Promise.all(
|
||||
Object.keys(this.fetchers).map(sheet => {
|
||||
return this.fetchers[sheet].update()
|
||||
})
|
||||
).then(results => {
|
||||
if (results.every(r => r)) {
|
||||
me.rebuildBlueprintsAsync()
|
||||
return copy.success.update
|
||||
} else {
|
||||
throw new Error(copy.errors.update)
|
||||
|
||||
Reference in New Issue
Block a user