mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 22:16:40 +00:00
fix(resources/notes): resolve fetch on deletion
This commit is contained in:
1 parent
ebe75dba1f
commit
7e9ad952cf
3 files changed
+7
No files matched your search
@@ -14,6 +14,10 @@ onNet(events.NOTE_SEND_NOTE_SUCCESS, () => {
|
||||
emitNet(events.NOTE_FETCH_ALL_NOTES);
|
||||
});
|
||||
|
||||
onNet(events.NOTE_DELETE_NOTE_SUCCESS, () => {
|
||||
emitNet(events.NOTE_FETCH_ALL_NOTES);
|
||||
});
|
||||
|
||||
RegisterNuiCallbackType(events.NOTE_DELETE_NOTE);
|
||||
on(`__cfx_nui:${events.NOTE_DELETE_NOTE}`, (data: any) => {
|
||||
emitNet(events.NOTE_DELETE_NOTE, data);
|
||||
|
||||
@@ -67,6 +67,8 @@ onNet(events.NOTE_DELETE_NOTE, async (noteId: NoteId) => {
|
||||
const _identifier = getIdentifier(pSource);
|
||||
await deleteNote(noteId.id, _identifier);
|
||||
|
||||
emitNet(events.NOTE_DELETE_NOTE_SUCCESS, pSource);
|
||||
|
||||
emitNet(events.NOTE_ACTION_RESULT, pSource, {
|
||||
message: 'NOTES_DELETE_SUCCESS',
|
||||
type: 'success',
|
||||
|
||||
@@ -89,6 +89,7 @@ export default {
|
||||
NOTE_SEND_NOTE: 'phone:sendNote',
|
||||
NOTE_SEND_NOTE_SUCCESS: 'phone:sendNoteSuccess',
|
||||
NOTE_DELETE_NOTE: 'phone:deleteNote',
|
||||
NOTE_DELETE_NOTE_SUCCESS: 'phone:deleteNoteSuccess',
|
||||
NOTE_UPDATE_NOTE: 'phone:updateNote',
|
||||
NOTE_UPDATE_NOTE_SUCCESS: 'phone:updateNoteSuccess',
|
||||
NOTE_UPDATE_NOTE_FAILURE: 'phone:updateNoteFailure',
|
||||
|
||||
Reference in new issue
Block a user