Browse Source

Add override keyword to torrent client service

dev
David Ludwig 4 years ago
parent
commit
92a21e0639
3 changed files with 6 additions and 6 deletions
  1. +2
    -2
      services/torrent/src/services/Database.ts
  2. +2
    -2
      services/torrent/src/services/IpcInterface.ts
  3. +2
    -2
      services/torrent/src/services/TorrentClient.ts

+ 2
- 2
services/torrent/src/services/Database.ts View File

@ -7,10 +7,10 @@ export default class Database extends DatabaseService
/** /**
* The entities to use * The entities to use
*/ */
protected entities: EntitySchemaTypes[] = Object.values(entities);
protected override entities: EntitySchemaTypes[] = Object.values(entities);
/** /**
* Override the createConnection function to correctly register with the connection manager * Override the createConnection function to correctly register with the connection manager
*/ */
protected createConnection = createConnection;
protected override createConnection = createConnection;
} }

+ 2
- 2
services/torrent/src/services/IpcInterface.ts View File

@ -29,7 +29,7 @@ export default class IpcInterface extends IpcServerService
/** /**
* Boot the IPC interface * Boot the IPC interface
*/ */
public async boot() {
public override async boot() {
this.torrentClient = this.app.service<TorrentClient>("Torrent Client"); this.torrentClient = this.app.service<TorrentClient>("Torrent Client");
await super.boot(); await super.boot();
} }
@ -37,7 +37,7 @@ export default class IpcInterface extends IpcServerService
/** /**
* Install the the event handlers * Install the the event handlers
*/ */
protected installMessageHandlers() {
protected override installMessageHandlers() {
this.addMessageHandler("add", this.add); this.addMessageHandler("add", this.add);
this.addMessageHandler("remove", this.remove); this.addMessageHandler("remove", this.remove);
this.addMessageHandler("list", this.list); this.addMessageHandler("list", this.list);


+ 2
- 2
services/torrent/src/services/TorrentClient.ts View File

@ -50,7 +50,7 @@ export class TorrentClient extends InternalService
/** /**
* Boot the service * Boot the service
*/ */
public async boot() {
public override async boot() {
this.__webtorrent = new WebTorrent(); this.__webtorrent = new WebTorrent();
this.__webtorrent.on("error", error => this.onError(error)); this.__webtorrent.on("error", error => this.onError(error));
@ -68,7 +68,7 @@ export class TorrentClient extends InternalService
* @TODO really this is kinda bad putting this here... * @TODO really this is kinda bad putting this here...
* Start the torrent client * Start the torrent client
*/ */
public start() {
public override start() {
this.log("Loading torrents..."); this.log("Loading torrents...");
this.loadTorrents(); this.loadTorrents();
} }


Loading…
Cancel
Save