Update:Remove relImagePath from Author entity

This commit is contained in:
advplyr 2022-12-26 15:29:45 -06:00
parent c3fc38639e
commit 8acf962864
3 changed files with 2 additions and 10 deletions

View File

@ -125,8 +125,7 @@ export default {
}, },
async removeCover() { async removeCover() {
var updatePayload = { var updatePayload = {
imagePath: null, imagePath: null
relImagePath: null
} }
this.processing = true this.processing = true
var result = await this.$axios.$patch(`/api/authors/${this.authorId}`, updatePayload).catch((error) => { var result = await this.$axios.$patch(`/api/authors/${this.authorId}`, updatePayload).catch((error) => {
@ -161,8 +160,7 @@ export default {
if (response.author.imagePath) { if (response.author.imagePath) {
this.$toast.success(this.$strings.ToastAuthorUpdateSuccess) this.$toast.success(this.$strings.ToastAuthorUpdateSuccess)
this.$store.commit('globals/showEditAuthorModal', response.author) this.$store.commit('globals/showEditAuthorModal', response.author)
} } else this.$toast.success(this.$strings.ToastAuthorUpdateSuccessNoImageFound)
else this.$toast.success(this.$strings.ToastAuthorUpdateSuccessNoImageFound)
} else { } else {
this.$toast.info('No updates were made for Author') this.$toast.info('No updates were made for Author')
} }

View File

@ -80,7 +80,6 @@ class AuthorController {
await this.cacheManager.purgeImageCache(req.author.id) // Purge cache await this.cacheManager.purgeImageCache(req.author.id) // Purge cache
} }
payload.imagePath = imageData.path payload.imagePath = imageData.path
payload.relImagePath = imageData.relPath
hasUpdated = true hasUpdated = true
} }
} }
@ -181,7 +180,6 @@ class AuthorController {
var imageData = await this.authorFinder.saveAuthorImage(req.author.id, authorData.image) var imageData = await this.authorFinder.saveAuthorImage(req.author.id, authorData.image)
if (imageData) { if (imageData) {
req.author.imagePath = imageData.path req.author.imagePath = imageData.path
req.author.relImagePath = imageData.relPath
hasUpdates = true hasUpdates = true
} }
} }

View File

@ -9,7 +9,6 @@ class Author {
this.name = null this.name = null
this.description = null this.description = null
this.imagePath = null this.imagePath = null
this.relImagePath = null
this.addedAt = null this.addedAt = null
this.updatedAt = null this.updatedAt = null
@ -24,7 +23,6 @@ class Author {
this.name = author.name || '' this.name = author.name || ''
this.description = author.description || null this.description = author.description || null
this.imagePath = author.imagePath this.imagePath = author.imagePath
this.relImagePath = author.relImagePath
this.addedAt = author.addedAt this.addedAt = author.addedAt
this.updatedAt = author.updatedAt this.updatedAt = author.updatedAt
} }
@ -36,7 +34,6 @@ class Author {
name: this.name, name: this.name,
description: this.description, description: this.description,
imagePath: this.imagePath, imagePath: this.imagePath,
relImagePath: this.relImagePath,
addedAt: this.addedAt, addedAt: this.addedAt,
updatedAt: this.updatedAt updatedAt: this.updatedAt
} }
@ -61,7 +58,6 @@ class Author {
this.description = data.description || null this.description = data.description || null
this.asin = data.asin || null this.asin = data.asin || null
this.imagePath = data.imagePath || null this.imagePath = data.imagePath || null
this.relImagePath = data.relImagePath || null
this.addedAt = Date.now() this.addedAt = Date.now()
this.updatedAt = Date.now() this.updatedAt = Date.now()
} }