addded notification

This commit is contained in:
hafifierahman
2024-11-04 01:18:29 +08:00
parent 8ec68e8913
commit f3020b33c5
11 changed files with 204 additions and 136 deletions
+16
View File
@@ -0,0 +1,16 @@
class SubscribePusher {
constructor(subscribe, event, apikey) {
this.subscribe = subscribe;
this.event = event;
this.apikey = apikey;
}
channel_subscribe() {
let channel = pusher.subscribe(this.subscribe);
channel.bind(this.event, function(data){
callback(data);
});
}
}
export default SubscribePusher;