mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-12-20 04:12:23 -06:00
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:
@@ -373,13 +373,13 @@ export class InstanceController {
|
||||
}
|
||||
|
||||
const settings: wa.LocalSettings = {
|
||||
rejectCall: rejectCall || false,
|
||||
rejectCall: rejectCall === true,
|
||||
msgCall: msgCall || '',
|
||||
groupsIgnore: groupsIgnore || true,
|
||||
alwaysOnline: alwaysOnline || false,
|
||||
readMessages: readMessages || false,
|
||||
readStatus: readStatus || false,
|
||||
syncFullHistory: syncFullHistory ?? false,
|
||||
groupsIgnore: groupsIgnore === true,
|
||||
alwaysOnline: alwaysOnline === true,
|
||||
readMessages: readMessages === true,
|
||||
readStatus: readStatus === true,
|
||||
syncFullHistory: syncFullHistory === true,
|
||||
};
|
||||
|
||||
await this.settingsService.create(instance, settings);
|
||||
|
||||
Reference in New Issue
Block a user