minors + set Favicon
This commit is contained in:
@@ -100,10 +100,10 @@ const settingsController = {
|
||||
}
|
||||
},
|
||||
|
||||
getUserLocale (req, res) {
|
||||
// load user locale specified in configuration
|
||||
res.json(settingsController.user_locale)
|
||||
},
|
||||
// getUserLocale (req, res) {
|
||||
// // load user locale specified in configuration
|
||||
// res.json(settingsController.user_locale)
|
||||
// },
|
||||
|
||||
async setRequest (req, res) {
|
||||
const { key, value, is_secret } = req.body
|
||||
@@ -111,6 +111,12 @@ const settingsController = {
|
||||
if (ret) { res.sendStatus(200) } else { res.sendStatus(400) }
|
||||
},
|
||||
|
||||
async setFavicon (req, res) {
|
||||
if (!req.file) return res.status(400).send('Mmmmm sould not be here!')
|
||||
await settingsController.set('favicon', path.join(req.file.destination, req.file.filename))
|
||||
res.sendStatus(200)
|
||||
},
|
||||
|
||||
getAllRequest (req, res) {
|
||||
// get public settings and public configuration
|
||||
const settings = {
|
||||
|
||||
Reference in New Issue
Block a user