mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-06-25 10:19:04 +02:00
implemented suggestions, extended CMPs with series
This commit is contained in:
parent
12c6a1baa0
commit
3b531144cf
6 changed files with 33 additions and 28 deletions
|
@ -763,7 +763,7 @@ class MiscController {
|
|||
return res.sendStatus(403)
|
||||
}
|
||||
|
||||
const { name, url, apiKey } = req.body;
|
||||
const { name, url, apiKey } = req.body
|
||||
|
||||
if (!name || !url || !apiKey) {
|
||||
return res.status(500).send(`Invalid patch data`)
|
||||
|
@ -794,18 +794,18 @@ class MiscController {
|
|||
return res.sendStatus(403)
|
||||
}
|
||||
|
||||
const { id } = req.params;
|
||||
const { id } = req.params
|
||||
|
||||
if (!id) {
|
||||
return res.status(500).send(`Invalid delete data`)
|
||||
}
|
||||
|
||||
const provider = await Database.customMetadataProviderModel.findByPk(id);
|
||||
await Database.removeCustomMetadataProviderById(id);
|
||||
const provider = await Database.customMetadataProviderModel.findByPk(id)
|
||||
await Database.removeCustomMetadataProviderById(id)
|
||||
|
||||
SocketAuthority.adminEmitter('custom_metadata_provider_removed', provider)
|
||||
|
||||
res.json({})
|
||||
res.sendStatus(200)
|
||||
}
|
||||
}
|
||||
module.exports = new MiscController()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue