base: Slight changes
This commit is contained in:
parent
857a087410
commit
16b87aabcf
4 changed files with 5 additions and 5 deletions
|
@ -77,6 +77,7 @@ export default class ArticleRoutes {
|
|||
params = params.concat(mediaToDatabase(banner, body.remove_banner === 'true'))
|
||||
params = params.concat(mediaToDatabase(media, body.remove_media === 'true'))
|
||||
}
|
||||
|
||||
let res = await ctx.db.safeCallProc('article_auth_get_update_create', params)
|
||||
|
||||
ctx.body = this.private_getUpdateArticle_resOutput(res)
|
||||
|
|
|
@ -53,6 +53,7 @@ nconf.defaults({
|
|||
"iss": "dev",
|
||||
"path": "https://media.nfp.is/media/resize",
|
||||
"filePath": "https://media.nfp.is/media",
|
||||
"directFilePath": "https://media.nfp.is/media/noprefix",
|
||||
"removePath": "https://media.nfp.is/media/",
|
||||
"preview": {
|
||||
"out": "base64",
|
||||
|
|
|
@ -15,8 +15,6 @@ export function uploadMedia(file) {
|
|||
}
|
||||
}
|
||||
|
||||
console.log(media)
|
||||
|
||||
let body = {}
|
||||
|
||||
if (media.preview) {
|
||||
|
|
|
@ -5,9 +5,9 @@ export function mediaToDatabase(media, removeFlag) {
|
|||
media.type,
|
||||
media.path,
|
||||
media.size,
|
||||
media.preview.base64,
|
||||
media.sizes.small.avif.path.replace(/_small\.avif$/, ''),
|
||||
JSON.stringify(media.sizes),
|
||||
media.preview?.base64 || null,
|
||||
media.sizes?.small?.avif?.path?.replace(/_small\.avif$/, '') || null,
|
||||
JSON.stringify(media.sizes || {}),
|
||||
removeFlag ? 1 : 0,
|
||||
]
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue