Filter to show individual and organization entities
This commit is contained in:
@@ -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", {
|
||||
|
||||
Reference in New Issue
Block a user