Some order on list
This commit is contained in:
parent
c4babbe5aa
commit
7b3fca46d2
5 changed files with 15 additions and 5 deletions
|
@ -3,7 +3,9 @@ const models = require("../models");
|
|||
module.exports = socket => {
|
||||
return async () => {
|
||||
let desserts = []
|
||||
for (let i of await models.Dessert.findAll()) {
|
||||
for (let i of await models.Dessert.findAll({
|
||||
order: ["name"]
|
||||
})) {
|
||||
desserts.push({
|
||||
id: i.id,
|
||||
name: i.name,
|
||||
|
|
|
@ -3,7 +3,9 @@ const models = require("../models");
|
|||
module.exports = socket => {
|
||||
return async () => {
|
||||
let dishes = []
|
||||
for (let d of await models.Dish.findAll()) {
|
||||
for (let d of await models.Dish.findAll({
|
||||
order: ["name"]
|
||||
})) {
|
||||
dishes.push({
|
||||
id: d.id,
|
||||
name: d.name,
|
||||
|
|
|
@ -3,7 +3,9 @@ const models = require("../models");
|
|||
module.exports = socket => {
|
||||
return async () => {
|
||||
let drinks = []
|
||||
for (let i of await models.Drink.findAll()) {
|
||||
for (let i of await models.Drink.findAll({
|
||||
order: ["name"]
|
||||
})) {
|
||||
drinks.push({
|
||||
id: i.id,
|
||||
name: i.name,
|
||||
|
|
|
@ -3,7 +3,9 @@ const models = require("../models");
|
|||
module.exports = socket => {
|
||||
return async () => {
|
||||
let ingredients = []
|
||||
for (let i of await models.Ingredient.findAll()) {
|
||||
for (let i of await models.Ingredient.findAll({
|
||||
order: ["name"]
|
||||
})) {
|
||||
ingredients.push({
|
||||
id: i.id,
|
||||
name: i.name,
|
||||
|
|
|
@ -3,7 +3,9 @@ const models = require("../models");
|
|||
module.exports = socket => {
|
||||
return async () => {
|
||||
let sauces = []
|
||||
for (let d of await models.Sauce.findAll()) {
|
||||
for (let d of await models.Sauce.findAll({
|
||||
order: ["name"]
|
||||
})) {
|
||||
sauces.push({
|
||||
id: d.id,
|
||||
name: d.name,
|
||||
|
|
Reference in a new issue