2021-01-24 19:11:45 +01:00
|
|
|
import { ipcClient } from './ipc-client';
|
2019-07-26 23:05:29 +02:00
|
|
|
|
2020-11-09 18:15:30 +01:00
|
|
|
export function nhentaiSaveFavorites(): Promise<void> {
|
|
|
|
return ipcClient.ask(IpcChannel.NHENTAI_SAVE_FAVORITES) as Promise<void>;
|
2019-07-26 23:05:29 +02:00
|
|
|
}
|
2021-01-07 04:51:07 +01:00
|
|
|
|
2021-01-24 19:11:45 +01:00
|
|
|
export function nhentaiGetWork(galleryId: string): Promise<WorkEntityInterface> {
|
|
|
|
return ipcClient.ask(IpcChannel.NHENTAI_GET_WORK, { galleryId }) as Promise<WorkEntityInterface>;
|
2021-01-07 04:51:07 +01:00
|
|
|
}
|
2021-01-24 19:11:45 +01:00
|
|
|
|
|
|
|
export const entityApi = {
|
|
|
|
fetchWork(id: number): Promise<WorkSerializedInterface> {
|
|
|
|
return ipcClient.ask(IpcChannel.ENTITY_GET_WORK, { id });
|
|
|
|
},
|
|
|
|
};
|