mirror of
https://github.com/hydralauncher/hydra.git
synced 2026-01-11 13:56:16 +00:00
11 lines
399 B
TypeScript
11 lines
399 B
TypeScript
import { downloadSourcesSublevel } from "@main/level";
|
|
import { registerEvent } from "../register-event";
|
|
import { orderBy } from "lodash-es";
|
|
|
|
const getDownloadSources = async (_event: Electron.IpcMainInvokeEvent) => {
|
|
const allSources = await downloadSourcesSublevel.values().all();
|
|
return orderBy(allSources, "createdAt", "desc");
|
|
};
|
|
|
|
registerEvent("getDownloadSources", getDownloadSources);
|