Skip to content

Commit

Permalink
Merge pull request #3 from dOrgTech/network-filter-patch
Browse files Browse the repository at this point in the history
Add network switching to the DAOs
  • Loading branch information
EightRice authored Dec 10, 2022
2 parents 4b53c12 + 5b412be commit e661e74
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions routes/daos.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,12 @@ const { getInputFromSigPayload } = require("../utils");
const ObjectId = require("mongodb").ObjectId;

// This section will help you get a list of all the records.
daoRoutes.route("/daos").get((req, res) => {
daoRoutes.route("/daos").post((req, res) => {
const { network } = req.body;
let db_connect = dbo.getDb("Lite");
db_connect
.collection("DAOs")
.find({})
.find({ network })
.toArray((err, result) => {
if (err) throw err;
res.json(result);
Expand Down

0 comments on commit e661e74

Please sign in to comment.