mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-12-15 08:19:37 +00:00
Fix:New authors not setting lastFirst column, updates for new Series model
This commit is contained in:
parent
7ff72a8920
commit
db86bfd63d
14 changed files with 234 additions and 225 deletions
|
|
@ -1,4 +1,5 @@
|
|||
const { DataTypes, Model, where, fn, col } = require('sequelize')
|
||||
const parseNameString = require('../utils/parsers/parseNameString')
|
||||
|
||||
class Author extends Model {
|
||||
constructor(values, options) {
|
||||
|
|
@ -24,6 +25,16 @@ class Author extends Model {
|
|||
this.createdAt
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {string} name
|
||||
* @returns {string}
|
||||
*/
|
||||
static getLastFirst(name) {
|
||||
if (!name) return null
|
||||
return parseNameString.nameToLastFirst(name)
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if author exists
|
||||
* @param {string} authorId
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue