Update library API endpoints to load library items from db

This commit is contained in:
advplyr 2023-08-13 17:45:53 -05:00
parent 3651fffbee
commit 6d6e8613cf
8 changed files with 352 additions and 114 deletions

View file

@ -75,7 +75,24 @@ module.exports = (sequelize) => {
imagePath: DataTypes.STRING
}, {
sequelize,
modelName: 'author'
modelName: 'author',
indexes: [
{
fields: [{
name: 'name',
collate: 'NOCASE'
}]
},
{
fields: [{
name: 'lastFirst',
collate: 'NOCASE'
}]
},
{
fields: ['libraryId']
}
]
})
const { library } = sequelize.models