removing .nuxt

This commit is contained in:
Mark Cooper 2021-08-19 11:31:03 -05:00
parent 7532b756a7
commit 53e46ff54d
44 changed files with 278 additions and 5279 deletions

View file

@ -3,11 +3,12 @@ class Book {
this.olid = null
this.title = null
this.author = null
this.series = null
this.publishYear = null
this.publisher = null
this.description = null
this.cover = null
this.genres = []
this.genre = []
if (book) {
this.construct(book)
@ -18,11 +19,12 @@ class Book {
this.olid = book.olid
this.title = book.title
this.author = book.author
this.series = book.series
this.publishYear = book.publish_year
this.publisher = book.publisher
this.description = book.description
this.cover = book.cover
this.genres = book.genres
this.genre = book.genre
}
toJSON() {
@ -30,11 +32,12 @@ class Book {
olid: this.olid,
title: this.title,
author: this.author,
series: this.series,
publishYear: this.publish_year,
publisher: this.publisher,
description: this.description,
cover: this.cover,
genres: this.genres
genre: this.genre
}
}
@ -42,10 +45,11 @@ class Book {
this.olid = data.olid || null
this.title = data.title || null
this.author = data.author || null
this.series = data.series || null
this.publishYear = data.publish_year || null
this.description = data.description || null
this.cover = data.cover || null
this.genres = data.genres || []
this.genre = data.genre || []
}
update(payload) {
@ -53,12 +57,12 @@ class Book {
for (const key in payload) {
if (payload[key] === undefined) continue;
if (key === 'genres') {
if (payload['genres'] === null && this.genres !== null) {
this.genres = []
if (key === 'genre') {
if (payload['genre'] === null && this.genre !== null) {
this.genre = []
hasUpdates = true
} else if (payload['genres'].join(',') !== this.genres.join(',')) {
this.genres = payload['genres']
} else if (payload['genre'].join(',') !== this.genre.join(',')) {
this.genre = payload['genre']
hasUpdates = true
}
} else if (this[key] !== undefined && payload[key] !== this[key]) {