Skip to content

Commit 3d50e80

Browse files
committed
fix for swagger servers bug
1 parent c0f2812 commit 3d50e80

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/middleware/swagger.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,9 @@ export const useSwagger = (app: Elysia) =>
1111
path: "/docs",
1212
documentation: {
1313
info: { title, version, description: "RESTful API for disc golf discs." },
14-
servers: [
15-
...(!Config.IS_PROD && [{ url: `http://localhost:${Config.PORT}`, description: "development" }]),
16-
{ url: "https://discit-api.fly.dev", description: "production" }
17-
]
14+
servers: Config.IS_PROD
15+
? [{ url: "https://discit-api.fly.dev", description: "production" }]
16+
: [{ url: `http://localhost:${Config.PORT}`, description: "development" }]
1817
},
1918
exclude: ["/", /^\/(docs|bag)/i]
2019
})

0 commit comments

Comments
 (0)