mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-08-02 17:24:57 +02:00
Remove unused functions, jsdoc updates, auto-formatting
This commit is contained in:
parent
964ef910b6
commit
3fd290c518
21 changed files with 889 additions and 872 deletions
|
@ -19,12 +19,11 @@ class Setting extends Model {
|
|||
}
|
||||
|
||||
static async getOldSettings() {
|
||||
const settings = (await this.findAll()).map(se => se.value)
|
||||
const settings = (await this.findAll()).map((se) => se.value)
|
||||
|
||||
|
||||
const emailSettingsJson = settings.find(se => se.id === 'email-settings')
|
||||
const serverSettingsJson = settings.find(se => se.id === 'server-settings')
|
||||
const notificationSettingsJson = settings.find(se => se.id === 'notification-settings')
|
||||
const emailSettingsJson = settings.find((se) => se.id === 'email-settings')
|
||||
const serverSettingsJson = settings.find((se) => se.id === 'server-settings')
|
||||
const notificationSettingsJson = settings.find((se) => se.id === 'notification-settings')
|
||||
|
||||
return {
|
||||
settings,
|
||||
|
@ -43,20 +42,23 @@ class Setting extends Model {
|
|||
|
||||
/**
|
||||
* Initialize model
|
||||
* @param {import('../Database').sequelize} sequelize
|
||||
* @param {import('../Database').sequelize} sequelize
|
||||
*/
|
||||
static init(sequelize) {
|
||||
super.init({
|
||||
key: {
|
||||
type: DataTypes.STRING,
|
||||
primaryKey: true
|
||||
super.init(
|
||||
{
|
||||
key: {
|
||||
type: DataTypes.STRING,
|
||||
primaryKey: true
|
||||
},
|
||||
value: DataTypes.JSON
|
||||
},
|
||||
value: DataTypes.JSON
|
||||
}, {
|
||||
sequelize,
|
||||
modelName: 'setting'
|
||||
})
|
||||
{
|
||||
sequelize,
|
||||
modelName: 'setting'
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = Setting
|
||||
module.exports = Setting
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue