generated from nhcarrigan/template
fix: correct enum value in books
This commit is contained in:
@@ -48,7 +48,7 @@ export class BookService {
|
|||||||
if (data.coverImage) {
|
if (data.coverImage) {
|
||||||
if (data.coverImage.startsWith("data:")) {
|
if (data.coverImage.startsWith("data:")) {
|
||||||
const sizeInBytes = data.coverImage.length * 0.75;
|
const sizeInBytes = data.coverImage.length * 0.75;
|
||||||
if (sizeInBytes > MAX_LENGTHS.IMAGE_DATA) {
|
if (sizeInBytes > MAX_LENGTHS.DATA_URL) {
|
||||||
throw new Error("Cover image must be under 5MB.");
|
throw new Error("Cover image must be under 5MB.");
|
||||||
}
|
}
|
||||||
if (!validateDataUrl(data.coverImage)) {
|
if (!validateDataUrl(data.coverImage)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user