Archived
1
0
Fork 0

Some order on list

This commit is contained in:
Ethanell 2020-05-30 17:02:17 +02:00
parent c4babbe5aa
commit 7b3fca46d2
5 changed files with 15 additions and 5 deletions

View file

@ -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,

View file

@ -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,

View file

@ -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,

View file

@ -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,

View file

@ -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,