mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 22:16:40 +00:00
working client/server intaction
This commit is contained in:
1 parent
c19d0ee3aa
commit
2920267ef3
8 files changed
+99
-58
No files matched your search
@@ -0,0 +1,15 @@
|
||||
import events from '../utils/events';
|
||||
import { sendTwitterMessage } from '../utils/messages';
|
||||
|
||||
RegisterNuiCallbackType(events.TWITTER_FETCH_TWEETS);
|
||||
on(`__cfx_nui:${events.TWITTER_FETCH_TWEETS}`, () => {
|
||||
emitNet(events.TWITTER_FETCH_TWEETS);
|
||||
});
|
||||
|
||||
onNet(events.TWITTER_FETCH_TWEETS_SUCCESS, (results: any) => {
|
||||
sendTwitterMessage(events.TWITTER_FETCH_TWEETS_SUCCESS, results);
|
||||
});
|
||||
|
||||
onNet(events.TWITTER_FETCH_TWEETS_FAILURE, () => {
|
||||
sendTwitterMessage(events.TWITTER_FETCH_TWEETS_FAILURE);
|
||||
});
|
||||
Reference in new issue
Block a user