DatasetController.js

20 lines | 463 B Blame History Raw Download
'use strict'
const Theme = use('App/Models/Theme')

class DatasetController {
  async index({view}) {
    const themes = await Theme.query()
      .with('elements')
      .with('elements.submissions')
      .with('elements.submissions.steward.contact')
      .with('elements.submissions.status')
      .orderBy('name', 'asc')
      .fetch()
    return view.render('datasets.index', {
      themes: themes.toJSON()
    })
  }
}

module.exports = DatasetController