Skip to content

Commit d25e569

Browse files
authored
Changing path to Swagger favicon (#119)
1 parent 0cf19bc commit d25e569

File tree

6 files changed

+6
-4
lines changed

6 files changed

+6
-4
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -312,8 +312,8 @@ For questions and support please use the channel #support in Kryptokrona Discord
312312
The following sponsors are either helping the project with free usage, great discounts of services or in other ways helping
313313
via advertisement.
314314

315-
<p align="center">
316-
<img src="./assets/img/novastack.png" alt="Novastack Hosting"/>
315+
<p align="left">
316+
<img src="./assets/img/novastack.png" alt="Novastack Hosting" width="300"/>
317317
</p>
318318

319319
# Contributors
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

server.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ app.use(express.json())
3333
app.use(express.urlencoded({ extended: false }))
3434
app.use(cookieParser())
3535
app.use(express.static(path.join(__dirname, 'public')))
36+
app.use('/public', express.static(__dirname + '/public'));
37+
3638

3739
app.locals.sitetitle = 'Hugin Cache'
3840

@@ -73,9 +75,9 @@ const swaggerOptions = {
7375
}
7476

7577
const swaggerCustomOptions = {
76-
customCss: fs.readFileSync('./public/css/openapi.css').toString(),
78+
customCss: fs.readFileSync('./public/static/css/openapi.css').toString(),
7779
customSiteTitle: `${process.env.SYS_PROJECT_NAME} API Docs`,
78-
customfavIcon: '/img/favicon.ico'
80+
customfavIcon: process.env.NODE_ENV === 'development' ? '/api/docs/static/img/favicon.ico' : '/api/docs/static/img/favicon.ico',
7981
};
8082

8183
const openapiSpecification = swaggerJsdoc(swaggerOptions);

0 commit comments

Comments
 (0)