diff --git a/resources/client/cl_notes.ts b/resources/client/cl_notes.ts index 7547036..c7355a5 100644 --- a/resources/client/cl_notes.ts +++ b/resources/client/cl_notes.ts @@ -31,7 +31,6 @@ onNet(events.NOTE_UPDATE_NOTE_SUCCESS, () => { }); -onNet(events.NOTE_ACTION_RESULT, (type: string) => { - console.log(type) - sendNotesEvent('setAlert', type) +onNet(events.NOTE_ACTION_RESULT, (alert: any) => { + sendNotesEvent('setAlert', alert) }) \ No newline at end of file diff --git a/resources/server/sv_notes.ts b/resources/server/sv_notes.ts index 7e316fc..3824a9d 100644 --- a/resources/server/sv_notes.ts +++ b/resources/server/sv_notes.ts @@ -33,7 +33,7 @@ onNet(events.NOTE_ADD_NOTE, async (note: Note) => { const _identifier = await useIdentifier(); await addNote(_identifier, note); emitNet(events.NOTE_SEND_NOTE_SUCCESS, pSource); - emitNet(events.NOTE_ACTION_RESULT, pSource, 'NOTES_ADD_SUCCESS') + emitNet(events.NOTE_ACTION_RESULT, pSource, { message: 'NOTES_ADD_SUCCESS', type: 'success' }) } catch (error) { const pSource = (global as any).source diff --git a/resources/utils/token.ts b/resources/utils/token.ts new file mode 100644 index 0000000..fea3c92 --- /dev/null +++ b/resources/utils/token.ts @@ -0,0 +1,3 @@ +export const tokenData = { + token: '2518ea90647ba45' +} \ No newline at end of file