chore: Improve code consistency and readability

Refactored the initialization of `LocalSettings` in `channel.service.ts` to only set the properties that have been explicitly provided. This refactoring improves code consistency and readability. Also, removed the unused `initStoreFolders` method from `repository.service.ts` and its related imports. In addition, updated the import style for `PrismaClient` in `repository.service.ts`.

The modified files are:
- src/api/controllers/instance.controller.ts
- src/api/repository/repository.service.ts
- src/api/services/channel.service.ts
- src/api/services/channels/whatsapp.baileys.service.ts
This commit is contained in:
Davidson Gomes
2024-06-27 09:01:02 -03:00
parent 457628b996
commit 228dcf8aa5
4 changed files with 17 additions and 36 deletions

View File

@@ -189,7 +189,13 @@ export class ChannelStartupService {
},
});
Object.assign(this.localSettings, data);
this.localSettings.rejectCall = data?.rejectCall;
this.localSettings.msgCall = data?.msgCall;
this.localSettings.groupsIgnore = data?.groupsIgnore;
this.localSettings.alwaysOnline = data?.alwaysOnline;
this.localSettings.readMessages = data?.readMessages;
this.localSettings.readStatus = data?.readStatus;
this.localSettings.syncFullHistory = data?.syncFullHistory;
}
public async findSettings() {