ensure all pfps on startup

This commit is contained in:
Wingy 2021-09-15 02:57:28 -04:00
parent 62d5e395fa
commit 815b621471

View file

@ -18,6 +18,13 @@ module.exports = ({ db, config }) => {
await db.put(user) await db.put(user)
} }
;(async () => {
const { rows } = await db.allDocs({ include_docs: true })
for (const row of rows) {
await ensurePfp(row.id)
}
})()
const router = express.Router() const router = express.Router()
router.use('/', express.static(path.join(__dirname, '../static'))) router.use('/', express.static(path.join(__dirname, '../static')))