2
0
mirror of https://github.com/frappe/books.git synced 2024-11-14 09:24:04 +00:00
books/fyo/demux/auth.ts
2023-07-10 14:42:20 +05:30

19 lines
442 B
TypeScript

import { AuthDemuxBase } from 'utils/auth/types';
import { Creds } from 'utils/types';
export class AuthDemux extends AuthDemuxBase {
#isElectron = false;
constructor(isElectron: boolean) {
super();
this.#isElectron = isElectron;
}
async getCreds(): Promise<Creds> {
if (this.#isElectron) {
return await ipc.getCreds();
} else {
return { errorLogUrl: '', tokenString: '', telemetryUrl: '' };
}
}
}