mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-16 14:16:16 -08:00
refactor: rework ipc events handling
This commit is contained in:
1 parent
d3fc2a5af8
commit
656c86dc30
24 files changed
+218
-389
No files matched your search
@@ -1,5 +1,4 @@
|
||||
import { Injectable, inject } from '@angular/core';
|
||||
import { XTREAM_REQUEST } from 'shared-interfaces';
|
||||
import { DataService } from './data.service';
|
||||
|
||||
export type PortalStatus = 'active' | 'inactive' | 'expired' | 'unavailable';
|
||||
@@ -29,14 +28,17 @@ export class PortalStatusService {
|
||||
normalizedUrl = serverUrl;
|
||||
}
|
||||
|
||||
let response = await this.dataService.sendIpcEvent(XTREAM_REQUEST, {
|
||||
url: normalizedUrl,
|
||||
params: {
|
||||
password,
|
||||
username,
|
||||
action: 'get_account_info',
|
||||
},
|
||||
});
|
||||
let response = await this.dataService.sendIpcEvent(
|
||||
'XTREAM_REQUEST',
|
||||
{
|
||||
url: normalizedUrl,
|
||||
params: {
|
||||
password,
|
||||
username,
|
||||
action: 'get_account_info',
|
||||
},
|
||||
}
|
||||
);
|
||||
response = response?.payload;
|
||||
|
||||
if (!response?.user_info?.status) {
|
||||
|
||||
Reference in new issue
Block a user