mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-12-18 19:32:21 -06:00
refactor(eslint): update TypeScript object type usage and adjust linting rules
- Change usage of `Object` to `object` in various files for better type safety. - Update ESLint configuration to change `@typescript-eslint/no-unused-vars` from 'error' to 'warn' and disable certain rules related to object types.
This commit is contained in:
@@ -105,7 +105,7 @@ export class EventManager {
|
||||
instanceName: string;
|
||||
origin: string;
|
||||
event: string;
|
||||
data: Object;
|
||||
data: object;
|
||||
serverUrl: string;
|
||||
dateTime: string;
|
||||
sender: string;
|
||||
|
||||
@@ -431,7 +431,7 @@ export class ChannelStartupService {
|
||||
return data;
|
||||
}
|
||||
|
||||
public async sendDataWebhook<T = any>(event: Events, data: T, local = true, integration?: string[]) {
|
||||
public async sendDataWebhook<T extends object = any>(event: Events, data: T, local = true, integration?: string[]) {
|
||||
const serverUrl = this.configService.get<HttpServer>('SERVER').URL;
|
||||
const tzoffset = new Date().getTimezoneOffset() * 60000; //offset in milliseconds
|
||||
const localISOTime = new Date(Date.now() - tzoffset).toISOString();
|
||||
|
||||
Reference in New Issue
Block a user