Deployment-Hotfixes (#5)

Reviewed-on: #5
Co-authored-by: Armored-Dragon <forgejo3829105@armoreddragon.com>
Co-committed-by: Armored-Dragon <forgejo3829105@armoreddragon.com>
pull/2/head
Armored Dragon 2023-11-20 20:53:37 +00:00 committed by Armored Dragon
parent 44e2f66707
commit 94424df08f
3 changed files with 6 additions and 4 deletions

View File

@ -230,7 +230,7 @@ async function deleteImage(image, requester_id) {
const post = await getBlog({ id: image.parent, raw: true });
// Check if post exists
if (!post) return { success: false, message: "Post does not exist" };
if (!post.success) return { success: false, message: "Post does not exist" };
// Check for permissions
if (post.owner.id !== user.data.id || user.data.role !== "ADMIN") return { success: false, message: "User is not permitted" };
@ -257,7 +257,7 @@ async function _uploadImage(parent_id, parent_type, is_thumbnail, buffer, name)
const compressed_image = await sharp(buffer, { animated: true })
.resize({ ...size, withoutEnlargement: true, fit: "inside" })
.webp({ quality: 90 })
.webp({ quality: 90, animated: true })
.toBuffer();
const params = {

View File

@ -57,7 +57,8 @@
position: relative;
}
.e-image-area .image img {
height: 100%;
max-height: 100%;
max-width: 100%;
margin: auto;
}
.e-image-area .image div {

View File

@ -64,7 +64,8 @@ $background-body: #222;
position: relative;
img {
height: 100%;
max-height: 100%;
max-width: 100%;
margin: auto;
}