mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-06-30 04:25:03 +02:00
Init sqlite take 2
This commit is contained in:
parent
d86a3b3dc2
commit
cf7fd315b6
88 changed files with 7017 additions and 692 deletions
16
server/controllers2/libraryItem.controller.js
Normal file
16
server/controllers2/libraryItem.controller.js
Normal file
|
@ -0,0 +1,16 @@
|
|||
const itemDb = require('../db/item.db')
|
||||
|
||||
const getLibraryItem = async (req, res) => {
|
||||
let libraryItem = null
|
||||
if (req.query.expanded == 1) {
|
||||
libraryItem = await itemDb.getLibraryItemExpanded(req.params.id)
|
||||
} else {
|
||||
libraryItem = await itemDb.getLibraryItemMinified(req.params.id)
|
||||
}
|
||||
|
||||
res.json(libraryItem)
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
getLibraryItem
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue