mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-05-23 03:41:32 +00:00
Compare commits
4 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c009db9f28 | ||
|
|
325469c5a5 | ||
|
|
c97b36e11c | ||
|
|
e944b2a2f5 |
2 changed files with 4 additions and 1 deletions
|
|
@ -1,4 +1,5 @@
|
|||
const { Op } = require('sequelize')
|
||||
const uuid = require('uuid')
|
||||
|
||||
const Database = require('../Database')
|
||||
const Logger = require('../Logger')
|
||||
|
|
@ -115,6 +116,7 @@ class TokenManager {
|
|||
const payload = {
|
||||
userId: user.id,
|
||||
username: user.username,
|
||||
jti: uuid.v4(),
|
||||
type: 'access'
|
||||
}
|
||||
const options = {
|
||||
|
|
@ -138,6 +140,7 @@ class TokenManager {
|
|||
const payload = {
|
||||
userId: user.id,
|
||||
username: user.username,
|
||||
jti: uuid.v4(),
|
||||
type: 'refresh'
|
||||
}
|
||||
const options = {
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ class AuthorController {
|
|||
})
|
||||
if (libraryItems.length) {
|
||||
await Database.bookAuthorModel.removeByIds(req.author.id) // Remove all old BookAuthor
|
||||
await Database.bookAuthorModel.bulkCreate(bookAuthorsToCreate) // Create all new BookAuthor
|
||||
await Database.bookAuthorModel.bulkCreate(bookAuthorsToCreate, { ignoreDuplicates: true }) // Create all new unique BookAuthor
|
||||
for (const libraryItem of libraryItems) {
|
||||
await libraryItem.saveMetadataFile()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue