14 lines
329 B
TypeScript
14 lines
329 B
TypeScript
import { ipcMain } from 'electron';
|
|
import nhentai from './../services/nhentai-crawler';
|
|
|
|
ipcMain.on(IpcChannels.Credentials, (event: IpcEvent, args: ICredentials) => {
|
|
nhentai
|
|
.login(args.name, args.password)
|
|
.then(() => {
|
|
console.log('success');
|
|
})
|
|
.catch(() => {
|
|
console.log('fail');
|
|
});
|
|
});
|