ebac854da8
* The MongoDB/Mongoose data storage is removed in favor of Sequelize. This abstracts over SQLite or RDBMs like PostgreSQL and MSSQL. The default is SQLite, which significantly simplifies deployments in end-user environments. * As Spacedeck now has no more mandatory server dependencies, we can wrap it in Electron and ship it as a desktop application. * Removes docker-compose.yml * First version of import UI
18 lines
345 B
JavaScript
18 lines
345 B
JavaScript
'use strict';
|
|
|
|
require('../models/db');
|
|
var config = require('config');
|
|
|
|
module.exports = (req, res, next) => {
|
|
req.i18n.setLocale(req.i18n.prefLocale);
|
|
|
|
if (req.cookies.spacedeck_locale) {
|
|
req.i18n.setLocaleFromCookie();
|
|
}
|
|
|
|
if (req.user && req.user.prefs_language) {
|
|
req.i18n.setLocale(req.user.prefs_language);
|
|
}
|
|
next();
|
|
}
|