mirror of
https://github.com/openmhz/trunk-server.git
synced 2026-11-13 09:17:30 -05:00
Make sure shortNames stay lower case
This commit is contained in:
@@ -228,9 +228,10 @@ exports.ownSystem = async function (req, res, next) {
|
|||||||
|
|
||||||
// -------------------------------------------
|
// -------------------------------------------
|
||||||
exports.uniqueShortName = async function (req, res, next) {
|
exports.uniqueShortName = async function (req, res, next) {
|
||||||
|
console.error("locals: " + res.locals.shortName + " body: " + req.body.shortName )
|
||||||
try {
|
try {
|
||||||
var system = await System.findOne({
|
var system = await System.findOne({
|
||||||
shortName: res.locals.shortName
|
shortName: res.locals.shortName.toLowerCase()
|
||||||
});
|
});
|
||||||
|
|
||||||
if (system) {
|
if (system) {
|
||||||
|
|||||||
Reference in New Issue
Block a user