Improve admin dashboard
This commit is contained in:
24
src/server/api/stream/channels/ap-log.ts
Normal file
24
src/server/api/stream/channels/ap-log.ts
Normal file
@ -0,0 +1,24 @@
|
||||
import autobind from 'autobind-decorator';
|
||||
import Channel from '../channel';
|
||||
|
||||
export default class extends Channel {
|
||||
public readonly chName = 'apLog';
|
||||
public static shouldShare = true;
|
||||
|
||||
@autobind
|
||||
public async init(params: any) {
|
||||
// Subscribe events
|
||||
this.subscriber.on('apLog', this.onLog);
|
||||
}
|
||||
|
||||
@autobind
|
||||
private async onLog(log: any) {
|
||||
this.send('log', log);
|
||||
}
|
||||
|
||||
@autobind
|
||||
public dispose() {
|
||||
// Unsubscribe events
|
||||
this.subscriber.off('apLog', this.onLog);
|
||||
}
|
||||
}
|
@ -10,6 +10,7 @@ import messaging from './messaging';
|
||||
import messagingIndex from './messaging-index';
|
||||
import drive from './drive';
|
||||
import hashtag from './hashtag';
|
||||
import apLog from './ap-log';
|
||||
import gamesReversi from './games/reversi';
|
||||
import gamesReversiGame from './games/reversi-game';
|
||||
|
||||
@ -26,6 +27,7 @@ export default {
|
||||
messagingIndex,
|
||||
drive,
|
||||
hashtag,
|
||||
apLog,
|
||||
gamesReversi,
|
||||
gamesReversiGame
|
||||
};
|
||||
|
Reference in New Issue
Block a user