Fixed eslint errors (whitespaces)
Signed-off-by: Erik Michelson <erik@liltv.de>
This commit is contained in:
parent
f42304c967
commit
e0f729e014
16
bin/cleanup
16
bin/cleanup
@ -1,9 +1,9 @@
|
|||||||
#!/usr/bin/env node
|
#!/usr/bin/env node
|
||||||
|
|
||||||
const logger = require("../lib/logger");
|
const logger = require('../lib/logger')
|
||||||
const models = require('../lib/models')
|
const models = require('../lib/models')
|
||||||
|
|
||||||
logger.info("Cleaning up notes that should already have been removed. Sorry.")
|
logger.info('Cleaning up notes that should already have been removed. Sorry.')
|
||||||
|
|
||||||
async function cleanup () {
|
async function cleanup () {
|
||||||
await models.Note.findAll({
|
await models.Note.findAll({
|
||||||
@ -20,7 +20,8 @@ async function cleanup() {
|
|||||||
await models.Note.destroy({
|
await models.Note.destroy({
|
||||||
where: {
|
where: {
|
||||||
id: item.id
|
id: item.id
|
||||||
}})
|
}
|
||||||
|
})
|
||||||
await models.Revision.destroy({
|
await models.Revision.destroy({
|
||||||
where: {
|
where: {
|
||||||
noteId: item.id
|
noteId: item.id
|
||||||
@ -49,7 +50,8 @@ async function cleanup() {
|
|||||||
await models.Author.destroy({
|
await models.Author.destroy({
|
||||||
where: {
|
where: {
|
||||||
id: item.id
|
id: item.id
|
||||||
}})
|
}
|
||||||
|
})
|
||||||
logger.info(`Deleted authorship ${item.id} from user ${item.userId}`)
|
logger.info(`Deleted authorship ${item.id} from user ${item.userId}`)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -69,7 +71,8 @@ async function cleanup() {
|
|||||||
await models.Author.destroy({
|
await models.Author.destroy({
|
||||||
where: {
|
where: {
|
||||||
id: item.id
|
id: item.id
|
||||||
}})
|
}
|
||||||
|
})
|
||||||
logger.info(`Deleted authorship ${item.id} from note ${item.noteId}`)
|
logger.info(`Deleted authorship ${item.id} from note ${item.noteId}`)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -89,7 +92,8 @@ async function cleanup() {
|
|||||||
await models.Revision.destroy({
|
await models.Revision.destroy({
|
||||||
where: {
|
where: {
|
||||||
id: item.id
|
id: item.id
|
||||||
}})
|
}
|
||||||
|
})
|
||||||
logger.info(`Deleted revision ${item.id} from note ${item.userId}`)
|
logger.info(`Deleted revision ${item.id} from note ${item.userId}`)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user