mirror of
https://github.com/pawelmalak/flame.git
synced 2025-07-22 21:09:36 +02:00
Case-insensitive sorting. App version checking
This commit is contained in:
parent
e884c84aa8
commit
9a1ec76ffd
15 changed files with 104 additions and 11 deletions
|
@ -3,6 +3,7 @@ const ErrorResponse = require('../utils/ErrorResponse');
|
|||
const Category = require('../models/Category');
|
||||
const Bookmark = require('../models/Bookmark');
|
||||
const Config = require('../models/Config');
|
||||
const { Sequelize } = require('sequelize')
|
||||
|
||||
// @desc Create new category
|
||||
// @route POST /api/categories
|
||||
|
@ -41,7 +42,7 @@ exports.getCategories = asyncWrapper(async (req, res, next) => {
|
|||
model: Bookmark,
|
||||
as: 'bookmarks'
|
||||
}],
|
||||
order: [['name', 'ASC']]
|
||||
order: [[ Sequelize.fn('lower', Sequelize.col('Category.name')), 'ASC' ]]
|
||||
});
|
||||
|
||||
res.status(200).json({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue