mirror of
https://github.com/zoriya/elysia-swagger.git
synced 2026-06-05 06:49:21 +00:00
fix: use global prefix
This commit is contained in:
+3
-1
@@ -37,6 +37,8 @@ export const swagger =
|
||||
...documentation.info
|
||||
}
|
||||
|
||||
const pathWithPrefix = `${app.config.prefix}${path}`;
|
||||
|
||||
app.get(path, () => {
|
||||
return new Response(
|
||||
`<!DOCTYPE html>
|
||||
@@ -61,7 +63,7 @@ export const swagger =
|
||||
<script>
|
||||
window.onload = () => {
|
||||
window.ui = SwaggerUIBundle({
|
||||
url: '${path}/json',
|
||||
url: '${pathWithPrefix}/json',
|
||||
dom_id: '#swagger-ui',
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user