You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[ ] Regression
[x] Bug report
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead post your question on Stack Overflow.
Current behavior
I am using AzureStorageModule.withConfigAsync() in different modules with different config, which includes SAS, storage account and default container name and then injecting AzureStorageService in providers section. So all services (in my case 2) contains same config. And a small note, second module using config of first module in list order in app.module.ts, if I change that order, config will be changed as well
imagine two module's options as below, the only difference is config in useFactory field
@Module({
imports: [
AzureStorageModule.withConfigAsync({
useFactory: firstAzureConfig, // <-- in second module another config
inject: [ConfigService],
}),
],
providers: [
{
provide: AzureImagesStorageClient,
useFactory: (azureService: AzureStorageService) => {
console.log(azureService); // <-- here I see same configuration
return new AzureImagesStorageClient(azureService);
},
inject: [AzureStorageService],
}
]
Expected behavior
I expect that each module should contain its configuration and one should not override another one
Environment
Nest version: 10.2.10
For Tooling issues:
- Node version: v18.13.0
- Platform: Linux
The text was updated successfully, but these errors were encountered:
I'm submitting a...
Current behavior
I am using
AzureStorageModule.withConfigAsync()
in different modules with different config, which includes SAS, storage account and default container name and then injecting AzureStorageService in providers section. So all services (in my case 2) contains same config. And a small note, second module using config of first module in list order inapp.module.ts
, if I change that order, config will be changed as wellimagine two module's options as below, the only difference is config in useFactory field
Expected behavior
I expect that each module should contain its configuration and one should not override another one
Environment
The text was updated successfully, but these errors were encountered: