Last active
February 25, 2019 15:02
-
-
Save mororor/586701aa70094c1a425d71b0465b4eef to your computer and use it in GitHub Desktop.
authorizeWriter rewrite
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async authorizeWriter (key, writerKey, structures) { | |
if (!structures) return this.authorizeWriter(key, writerKey, [key]) | |
let library = await getLibrary(this.session) | |
let archive = await library.getArchive(key) | |
let results = [] | |
for (let i of structures) { | |
let structure = archive.structures.get(i) | |
console.log(structure) | |
results.push(structure.authorizeWriter(writerKey)) | |
} | |
return results | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
console output: