1
0
Fork 0
mirror of https://github.com/pawelmalak/flame.git synced 2025-07-19 03:29:37 +02:00

Case-insensitive sorting. App version checking

This commit is contained in:
unknown 2021-06-15 12:36:23 +02:00
parent e884c84aa8
commit 9a1ec76ffd
15 changed files with 104 additions and 11 deletions

View file

@ -2,6 +2,7 @@ const asyncWrapper = require('../middleware/asyncWrapper');
const ErrorResponse = require('../utils/ErrorResponse');
const App = require('../models/App');
const Config = require('../models/Config');
const { Sequelize } = require('sequelize');
// @desc Create new app
// @route POST /api/apps
@ -36,7 +37,7 @@ exports.createApp = asyncWrapper(async (req, res, next) => {
// @access Public
exports.getApps = asyncWrapper(async (req, res, next) => {
const apps = await App.findAll({
order: [['name', 'ASC']]
order: [[ Sequelize.fn('lower', Sequelize.col('name')), 'ASC' ]]
});
res.status(200).json({