mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-07-09 10:51:37 +00:00
fixed controller to include id of library without changing the schema
This commit is contained in:
parent
b127f0c406
commit
00b179e6b3
1 changed files with 1 additions and 4 deletions
|
|
@ -62,11 +62,8 @@ class LibraryController {
|
||||||
// Fetch stats for the current library
|
// Fetch stats for the current library
|
||||||
const libraryStats = await libraryHelpers.getLibraryStats(req);
|
const libraryStats = await libraryHelpers.getLibraryStats(req);
|
||||||
|
|
||||||
// Add the libraries id to the stats
|
|
||||||
libraryStats.id = library.id;
|
|
||||||
|
|
||||||
// Add this library's stats to the array of individual stats
|
// Add this library's stats to the array of individual stats
|
||||||
allStats.push(libraryStats);
|
allStats.push({ [library.id]: libraryStats });
|
||||||
|
|
||||||
// Combine all stats
|
// Combine all stats
|
||||||
for (const [key, value] of Object.entries(libraryStats)) {
|
for (const [key, value] of Object.entries(libraryStats)) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue