server: rTorrent: fix boolean response transformation in moveTorrents

Bug: #246
This commit is contained in:
Jesse Chan
2021-03-16 22:48:01 +08:00
parent bc22769ecf
commit 024df62f31
@@ -310,8 +310,8 @@ class RTorrentClientGatewayService extends ClientGatewayService {
}),
])
.then(this.processClientRequestSuccess, this.processRTorrentRequestError)
.then((responses: string[][]) =>
responses.map((response) => (typeof response === 'number' ? response : response?.[0])),
.then((responses: string[][]): boolean[] =>
responses.map((response) => (typeof response === 'number' ? response !== 0 : response?.[0] !== '0')),
)
.catch(() => undefined);