Filter to show individual and organization entities

This commit is contained in:
kngako
2022-06-25 01:10:41 +02:00
parent f8a63d73fd
commit 440a65ee10

View File

@@ -1,3 +1,4 @@
const { Op } = require("sequelize");
const express = require('express');
const campaigns = require('../campaigns');
@@ -8,8 +9,12 @@ module.exports = function (options) {
router.route('/')
.get(function(request, response, next) {
db.Entity.findAll({
include: [
],
where: {
[Op.or]: [
{ type: "individual" },
{ type: "organization" }
]
},
limit: 10
}).then(entities => {
response.display("entities", {