Skip to content

Commit 3137169

Browse files
author
Daniil Smirnov
committed
add custom route and exclude it from auth
1 parent b747a5a commit 3137169

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/units/api/index.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,10 @@ export default (async function(options) {
127127
, subdev: subdev
128128
})
129129
req.options = reqOptions
130+
if (req.path === '/api/v1/scheme') {
131+
next()
132+
return
133+
}
130134
accessTokenAuth(req)
131135
.then(() => {
132136
next()
@@ -147,6 +151,7 @@ export default (async function(options) {
147151
, exposeApiDocs: true
148152
, apiDoc: path.resolve(import.meta.dirname, 'swagger', 'api_v1.yaml')
149153
, paths: path.resolve(import.meta.dirname, 'paths')
154+
, docsPath: '/scheme'
150155
}
151156
expressInitialize(config)
152157

0 commit comments

Comments
 (0)