Improve admin dashboard

This commit is contained in:
syuilo 2018-11-03 11:38:00 +09:00
parent f9f2ca51ac
commit aadd5b95b8
No known key found for this signature in database
GPG key ID: BDC4C49D06AB9D69
10 changed files with 183 additions and 8 deletions

View 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);
}
}