mirror of
https://github.com/pawelmalak/flame.git
synced 2025-07-24 05:39:35 +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
|
@ -1,6 +1,7 @@
|
|||
const asyncWrapper = require('../middleware/asyncWrapper');
|
||||
const ErrorResponse = require('../utils/ErrorResponse');
|
||||
const Bookmark = require('../models/Bookmark');
|
||||
const { Sequelize } = require('sequelize');
|
||||
|
||||
// @desc Create new bookmark
|
||||
// @route POST /api/bookmarks
|
||||
|
@ -19,7 +20,7 @@ exports.createBookmark = asyncWrapper(async (req, res, next) => {
|
|||
// @access Public
|
||||
exports.getBookmarks = asyncWrapper(async (req, res, next) => {
|
||||
const bookmarks = await Bookmark.findAll({
|
||||
order: [['name', 'ASC']]
|
||||
order: [[ Sequelize.fn('lower', Sequelize.col('name')), 'ASC' ]]
|
||||
});
|
||||
|
||||
res.status(200).json({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue