refactor: remove console logs, update SaleInvoicePayload interface, and enhance GoodCategoriesService response mapping
This commit is contained in:
+13
-1
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user