mirror of https://github.com/requarks/wiki
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
608 B
26 lines
608 B
2 years ago
|
import fs from 'node:fs/promises'
|
||
2 years ago
|
|
||
2 years ago
|
export default {
|
||
3 years ago
|
async activated () { },
|
||
|
async deactivated () { },
|
||
|
async init () { },
|
||
|
async created (page) { },
|
||
|
async updated (page) { },
|
||
|
async deleted (page) { },
|
||
|
async renamed (page) { },
|
||
2 years ago
|
async assetUploaded ({ asset, tempFilePath, createReadStream }) {
|
||
|
await WIKI.db.knex('assets').where({
|
||
|
id: asset.id
|
||
|
}).update({
|
||
|
data: await fs.readFile(tempFilePath)
|
||
|
})
|
||
|
return {
|
||
|
available: true
|
||
|
}
|
||
|
},
|
||
3 years ago
|
async assetDeleted (asset) { },
|
||
|
async assetRenamed (asset) { },
|
||
|
async getLocalLocation () { },
|
||
|
async exportAll () { }
|
||
|
}
|