Skip to content

Commit

Permalink
fix(path): use dirname to resolve path
Browse files Browse the repository at this point in the history
  • Loading branch information
jlenon7 committed Oct 22, 2023
1 parent 5adb576 commit b0b704a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@athenna/http",
"version": "4.12.1",
"version": "4.12.2",
"description": "The Athenna Http server. Built on top of fastify.",
"license": "MIT",
"author": "João Lenon <[email protected]>",
Expand Down
12 changes: 11 additions & 1 deletion src/kernels/HttpKernel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,17 @@ export class HttpKernel {
const swaggerUiConfig = Config.get('http.swagger.ui', {})

if (!swaggerUiConfig.logo) {
const image = new File(Path.resources('images/athenna-logo.png'))
const __dirname = Module.createDirname(import.meta.url)
const image = new File(
resolve(
__dirname,
'..',
'..',
'resources',
'images',
'athenna-logo.png'
)
)

swaggerUiConfig.logo = {
type: 'image/png',
Expand Down

0 comments on commit b0b704a

Please sign in to comment.