Small Bree based job runner + gui
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

client.clicked.js 471B

12345678910111213141516171819202122
  1. const template = 'index/partials/on_click'
  2. const action = 'client/clicked'
  3. const state = {
  4. msg: 'wowow',
  5. h: 'registered jobs'
  6. }
  7. const handler = (request, h) => {
  8. const { timeline } = request.server.services()
  9. const jobs = timeline.bree.config.jobs
  10. return h.view(template, { ...state, jobs })
  11. }
  12. /**
  13. * Corresponds with templates/index/partials/clicked.pug
  14. */
  15. module.exports = {
  16. method: 'POST',
  17. path: `/${action}`,
  18. options: { handler }
  19. }