collective router update
This commit is contained in:
1 parent
d4de62d133
commit
f91dfcbcdf
2 files changed
+13
-15
No files matched your search
+12
-14
@@ -4,20 +4,18 @@ import db from '../core/db';
|
||||
import {getCourseNameByID} from '../models/course';
|
||||
import team from '../models/team';
|
||||
|
||||
export default function (app) {
|
||||
app.use(
|
||||
route.get('/collective', json(
|
||||
function *() {
|
||||
this.type = 'application/json';
|
||||
export default function () {
|
||||
return route.get('/collective', json(
|
||||
function *() {
|
||||
this.type = 'application/json';
|
||||
|
||||
let data = yield db.c('collective').find();
|
||||
if (!data) {
|
||||
this.status = 404;
|
||||
return;
|
||||
}
|
||||
|
||||
this.body = data;
|
||||
let data = yield db.c('collective').find();
|
||||
if (!data) {
|
||||
this.status = 404;
|
||||
return;
|
||||
}
|
||||
))
|
||||
);
|
||||
|
||||
this.body = data;
|
||||
}
|
||||
))
|
||||
};
|
||||
+1
-1
@@ -53,5 +53,5 @@ gallery(app);
|
||||
instagram(app);
|
||||
instagramIO(app);
|
||||
documents(app);
|
||||
collective(app);
|
||||
app.use(collective());
|
||||
app.use(error404());
|
||||
Reference in new issue
Block a user