-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Fredrik Jadebeck
committed
Mar 2, 2021
1 parent
6dc2c50
commit 0f53900
Showing
8 changed files
with
293 additions
and
5 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,57 @@ | ||
const jobs = require('./job.controllers') | ||
|
||
module.exports = function(router) { | ||
/** | ||
* @route POST /api/job | ||
* @returns {object} 200 - JSON object with ID of job created | ||
*/ | ||
router.post('/job/', jobs.create); | ||
router.post('/job/:name/', jobs.create); | ||
|
||
/** | ||
* @route POST /api/job/:name | ||
* @param {string} name - name for new job | ||
* @returns {object} 200 - JSON object with ID of job created | ||
*/ | ||
router.post('/job/:name', jobs.create); | ||
|
||
/** | ||
* @route GET /api/job/:id | ||
* @param {string} id - id of job | ||
* @returns {object} 200 - JSON object with ID of job created | ||
*/ | ||
router.get('/job/:id', jobs.findOne); | ||
/** | ||
* @route GET /api/job | ||
* @param {string} id - id of job | ||
* @returns {object} 200 - JSON object with list of jobs | ||
*/ | ||
|
||
router.get('/job/', jobs.findAll); | ||
router.delete('/job/:id', jobs.delete); | ||
|
||
/** | ||
* @route DELETE /api/job | ||
* @returns {object} 200 - JSON object with list of deleted jobs | ||
*/ | ||
router.delete('/job/', jobs.deleteAll); | ||
|
||
/** | ||
* @route DELETE /api/job/:id | ||
* @returns {object} 200 - JSON object with id of deleted job | ||
*/ | ||
router.delete('/job/:id', jobs.delete); | ||
|
||
/** | ||
* @route GET /api/job/:id/model | ||
* @param {string} id - job-id | ||
* @returns {object} 200 - File download of rounded model | ||
*/ | ||
router.get('/job/:id/model', jobs.downloadModel ); | ||
|
||
/** | ||
* @brief Downloads samples | ||
* @route GET /api/job/:id/samples | ||
* @param {string} id - job-id | ||
* @returns {object} 200 - File download of samples | ||
*/ | ||
router.get('/job/:id/samples', jobs.downloadSamples); | ||
router.get('/job/:id/mcmc_diagnostics',); | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Oops, something went wrong.