start with user favicon/locale personalization
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
const Mastodon = require('mastodon-api')
|
||||
const { setting: Setting } = require('../models')
|
||||
const config = require('config')
|
||||
|
||||
const settingsController = {
|
||||
settings: { initialized: false },
|
||||
secretSettings: {},
|
||||
@@ -36,6 +37,14 @@ const settingsController = {
|
||||
}
|
||||
},
|
||||
|
||||
async getUserLocale(req, res) {
|
||||
// console.error(res)
|
||||
// load user locale specified in configuration
|
||||
// res.json({ about: 'dentro user locale' })
|
||||
// res.sendStatus(200)
|
||||
return false
|
||||
},
|
||||
|
||||
async setRequest(req, res) {
|
||||
const { key, value, is_secret } = req.body
|
||||
const ret = await settingsController.set(key, value, is_secret)
|
||||
|
||||
@@ -85,6 +85,8 @@ api.delete('/event/notification/:code', eventController.delNotification)
|
||||
api.get('/settings', settingsController.getAllRequest)
|
||||
api.post('/settings', jwt, fillUser, isAdmin, settingsController.setRequest)
|
||||
|
||||
api.get('/settings/user_locale', settingsController.getUserLocale)
|
||||
|
||||
// confirm event
|
||||
api.get('/event/confirm/:event_id', jwt, isAuth, isAdmin, eventController.confirm)
|
||||
api.get('/event/unconfirm/:event_id', jwt, isAuth, isAdmin, eventController.unconfirm)
|
||||
|
||||
Reference in New Issue
Block a user