16 lines
520 B
TypeScript
16 lines
520 B
TypeScript
import { ipcClient } from './ipc-client';
|
|
|
|
export function nhentaiSaveFavorites(): Promise<void> {
|
|
return ipcClient.ask(IpcChannel.NHENTAI_SAVE_FAVORITES) as Promise<void>;
|
|
}
|
|
|
|
export function nhentaiGetWork(galleryId: string): Promise<WorkEntityInterface> {
|
|
return ipcClient.ask(IpcChannel.NHENTAI_GET_WORK, { galleryId }) as Promise<WorkEntityInterface>;
|
|
}
|
|
|
|
export const entityApi = {
|
|
fetchWork(id: number): Promise<WorkSerializedInterface> {
|
|
return ipcClient.ask(IpcChannel.ENTITY_GET_WORK, { id });
|
|
},
|
|
};
|