refactor: remove console logs, update SaleInvoicePayload interface, and enhance GoodCategoriesService response mapping

This commit is contained in:
2026-02-17 20:16:36 +03:30
parent 55b96d4f79
commit c7cd7cd855
7 changed files with 32 additions and 23 deletions
+13 -1
View File
@@ -30,7 +30,19 @@ async function bootstrap() {
})
.build()
const documentFactory = () => SwaggerModule.createDocument(app, config)
SwaggerModule.setup('swagger', app, documentFactory)
SwaggerModule.setup('swagger', app, documentFactory, {
swaggerOptions: {
persistAuthorization: true,
requestInterceptor: req => {
const _tokenStorage = localStorage.getItem('authorized')
if (_tokenStorage) {
const tokenStorage = JSON.parse(_tokenStorage)
req.headers['Authorization'] = `Bearer ${tokenStorage?.bearer?.value}`
}
return req
},
},
})
// Set API prefix and enable URI versioning so alls routes live under /api/v1/*
app.setGlobalPrefix('api')