Files
threetwo-acquisition-service/services/qbittorrent.service.ts
2023-09-01 09:18:37 -05:00

27 lines
561 B
TypeScript

"use strict";
import { Context, Service, ServiceBroker, ServiceSchema, Errors } from "moleculer";
export default class QBittorrentService extends Service {
// @ts-ignore
public constructor(
public broker: ServiceBroker,
schema: ServiceSchema<{}> = { name: "qbittorrent" },
) {
super(broker);
this.parseServiceSchema({
name: "qbittorrent",
mixins: [],
hooks: {},
actions: {
connect: {
rest: "POST /connect",
handler: async (ctx: Context<{}>) => {
return { foo: "bar" };
},
},
},
methods: {},
});
}
}