mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-04 15:49:49 +00:00
18 lines
438 B
JavaScript
18 lines
438 B
JavaScript
gopeed.events.onResolve(async function (ctx) {
|
|
if (Object.keys(gopeed.settings).length > 0){
|
|
throw new Error("settings is not empty");
|
|
}
|
|
|
|
ctx.res = {
|
|
name: "test",
|
|
files: Array(2).fill(true).map((_, i) => ({
|
|
name: `test-${i}.txt`,
|
|
size: 1024,
|
|
req: {
|
|
url: ctx.req.url + "/" + i,
|
|
}
|
|
}),
|
|
),
|
|
};
|
|
});
|