'use strict';

exports.run = function(app) {
	var routes = require('./routes/index');

	app.get('/', routes.index);

	app.get('/queries', routes.queries.list);
	app.get('/queries/:query', routes.queries.show);
	app.post('/queries/:query', routes.queries.create);
	app.delete('/queries/:query', routes.queries.delete);
	app.get('/queries/:query/results', routes.queries.showResults);

	// TODO: https://github.com/JeroenDeDauw/BeyondWikidata/blob/master/ApiSpec.md
};
@@ -377,16 +377,590 @@
 ults);%0A%0A
+%09app.get('/results', routes.results.list);%0A%09app.get('/results/:result', routes.results.show);%0A%09app.delete('/results/:result', routes.results.delete);%0A%0A%09app.post('/run', routes.run.run);%0A%09app.post('/run/:query', routes.run.runQuery);%0A%0A%09app.get('/users/:user', routes.users.listPrivateQueries);%0A%09app.get('/users/:user/queries', routes.users.listPrivateQueries);%0A%09app.get('/users/:user/queries/public', routes.users.listPublicQueries);%0A%09app.get('/users/:user/results', routes.users.listPrivateResults);%0A%09app.get('/users/:user/results/public', routes.users.listPublicResults);%0A%0A
 %09// TODO

Add routes from API spec