First push

This commit is contained in:
nkaputnik
2022-07-26 09:47:56 +02:00
parent 9617e576f0
commit 9c2a7598f2
16 changed files with 414 additions and 10438 deletions

View File

@@ -0,0 +1,9 @@
async function run() {
const {author, newName} = req.data
let a = await SELECT `name`.from(`Authors`).where({ID: author})
if(!a) return req.error (404, `Can't rename a non-existing author`)
await UPDATE (`Authors`,author).with ({ name: newName })
//await this.emit ('renamedAuthor', { author, newName })
output.msg = 'Success'
}
run()