[site] updated
This commit is contained in:
1 parent
e9ac51d675
commit
d5db0ca07e
4 files changed
+40
-33
No files matched your search
@@ -8,14 +8,22 @@ async function exists(ctx, id) {
|
||||
return Boolean(i)
|
||||
}
|
||||
|
||||
export default function () {
|
||||
export default function (store) {
|
||||
return compose([
|
||||
docs(store),
|
||||
documents(),
|
||||
document(),
|
||||
type()
|
||||
])
|
||||
}
|
||||
|
||||
function docs(store) {
|
||||
return route.get('/docs', async ctx => {
|
||||
const docs = await store.document.find({})
|
||||
ctx.body = docs
|
||||
})
|
||||
}
|
||||
|
||||
function documents() {
|
||||
return route.get('/documents', json(
|
||||
async(ctx) => {
|
||||
|
||||
+2
-2
@@ -20,14 +20,14 @@ import pages from './pages';
|
||||
|
||||
let main = () => route.get('/', index());
|
||||
|
||||
export function routes() {
|
||||
export function routes(store) {
|
||||
return compose([
|
||||
main(),
|
||||
sitemap(),
|
||||
schedule(),
|
||||
news(),
|
||||
gallery(),
|
||||
documents(),
|
||||
documents(store),
|
||||
teachers(),
|
||||
events(),
|
||||
articles(),
|
||||
|
||||
Reference in new issue
Block a user