refactor(server/contacts): Implement singleton architecture

This commit is contained in:
Taso committed 2021-04-18 15:38:51 -04:00
1 parent b684656379
commit c94c69c646
9 files changed
+200 -136

No files matched your search

+6 -2
View File
@@ -11,13 +11,16 @@ export interface IContactAlert {
setAlert: (type: string) => void;
}
export interface Contact {
id: number;
export interface PreDBContact {
display: string;
number: string;
avatar?: string;
}
export interface Contact extends PreDBContact {
id: number;
}
export enum ContactEvents {
SEND_CONTACTS = 'npwd:sendContacts',
GET_CONTACTS = 'npwd:getContacts',
@@ -29,4 +32,5 @@ export enum ContactEvents {
UPDATE_CONTACT_SUCCESS = 'npwd:updateContactSuccess',
ACTION_RESULT = 'npwd:contactActionResult',
SEND_ALERT = 'npwd:contactSetAlert',
MAIN_CLIENT_LISTER = 'npwd:contactMainListener',
}