Created
July 1, 2019 06:16
-
-
Save radicaldrew/cd8a400529032ff8f03e8a145dddfcb8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const controller = module.exports; | |
const models = require('../models/mongoose'); | |
controller.list = async (req, res) => { | |
const list = await models.integrations.find(); | |
let integrations = Array.from(list).map((integration) => { | |
return { | |
icon: integration.name.toLowerCase().trim() + '.png', | |
_id: integration.id, | |
name: integration.name, | |
}; | |
}); | |
res.render('integrations', {integrations, user: req.user}); | |
} | |
controller.add = async (req, res) => { | |
res.render('add_integration'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment