Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async writeFile(
bucketName: string,
filePath: string,
content: string
): Promise> {
const cmd = new S3C.WriteFile(bucketName, filePath, content)
cmd.mode = this.mode
return await this.handle(cmd.execute())
}
async save() {
const name = this.constructor.name
const key = `${name}/${this.id}.json`
const content = JSON.stringify(this)
return new S3.WriteFile(config.bucket, key, content).execute()
}
}