🔧 Fixing broken AirDCPP search
This commit is contained in:
@@ -551,7 +551,8 @@ export default class ImportService extends Service {
|
||||
params: { id: "string" },
|
||||
async handler(ctx: Context<{ id: string }>) {
|
||||
console.log(ctx.params.id);
|
||||
return await Comic.findById(ctx.params.id);
|
||||
return await Comic.findById(new ObjectId(ctx.params.id));
|
||||
|
||||
},
|
||||
},
|
||||
getComicBooksByIds: {
|
||||
|
||||
@@ -125,12 +125,9 @@ export default class SocketService extends Service {
|
||||
config: "object",
|
||||
},
|
||||
async handler(ctx) {
|
||||
console.log("a, a kanha kanha...");
|
||||
|
||||
const { query, config, namespace } = ctx.params;
|
||||
const namespacedInstance = this.io.of(namespace || "/");
|
||||
const ADCPPSocket = new AirDCPPSocket(config);
|
||||
console.log("asdas", ADCPPSocket);
|
||||
try {
|
||||
await ADCPPSocket.connect();
|
||||
const instance = await ADCPPSocket.post(
|
||||
@@ -148,6 +145,7 @@ export default class SocketService extends Service {
|
||||
`search`,
|
||||
`search_result_added`,
|
||||
(groupedResult) => {
|
||||
console.log(JSON.stringify(groupedResult, null, 4));
|
||||
namespacedInstance.emit(
|
||||
"searchResultAdded",
|
||||
groupedResult
|
||||
|
||||
Reference in New Issue
Block a user