mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
feat: removing publishers
This commit is contained in:
parent
4607665908
commit
602ee61cb6
8 changed files with 65 additions and 45 deletions
|
|
@ -2,13 +2,16 @@ import type { CatalogueSearchPayload } from "@types";
|
|||
import { registerEvent } from "../register-event";
|
||||
import { HydraApi } from "@main/services";
|
||||
|
||||
const PAGE_SIZE = 12;
|
||||
|
||||
const searchGames = async (
|
||||
_event: Electron.IpcMainInvokeEvent,
|
||||
payload: CatalogueSearchPayload
|
||||
payload: CatalogueSearchPayload,
|
||||
page: number
|
||||
) => {
|
||||
return HydraApi.post(
|
||||
"/catalogue/search",
|
||||
{ ...payload, take: 24, skip: 0 },
|
||||
{ ...payload, take: page * PAGE_SIZE, skip: (page - 1) * PAGE_SIZE },
|
||||
{ needsAuth: false }
|
||||
);
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue