[www] removed api middleware
This commit is contained in:
1 parent
952eaab69b
commit
18a0b36a09
1 file changed
-7
@@ -12,7 +12,6 @@ import cookie from 'koa-cookie'
|
|||||||
import session from 'koa-session'
|
import session from 'koa-session'
|
||||||
import bodyParser from 'koa-bodyparser'
|
import bodyParser from 'koa-bodyparser'
|
||||||
|
|
||||||
import apiV1 from 'hudozka-api-v1'
|
|
||||||
import {redirectionTable} from './config'
|
import {redirectionTable} from './config'
|
||||||
import {queryObject} from './routes'
|
import {queryObject} from './routes'
|
||||||
import {redirect} from './routes/redirect'
|
import {redirect} from './routes/redirect'
|
||||||
@@ -67,7 +66,6 @@ export default function (store) {
|
|||||||
}
|
}
|
||||||
}))
|
}))
|
||||||
app.use(logger())
|
app.use(logger())
|
||||||
app.use(apis(store))
|
|
||||||
app.use(convert(session(sessionConfig, app)))
|
app.use(convert(session(sessionConfig, app)))
|
||||||
app.use(cookie())
|
app.use(cookie())
|
||||||
app.use($(conditional()))
|
app.use($(conditional()))
|
||||||
@@ -103,8 +101,3 @@ export default function (store) {
|
|||||||
|
|
||||||
return Server(app.callback())
|
return Server(app.callback())
|
||||||
}
|
}
|
||||||
|
|
||||||
function apis(store) {
|
|
||||||
let checkAuth = authChecker(serviceKeys)
|
|
||||||
return mount('/api/v1', apiV1(checkAuth, store))
|
|
||||||
}
|
|
||||||
Reference in new issue
Block a user