mirror of
https://github.com/donaldzou/WGDashboard.git
synced 2025-10-03 07:46:18 +00:00
Moved DashboardAPIKey to its own file
This commit is contained in:
@@ -24,6 +24,7 @@ from modules.PeerJobLogger import PeerJobLogger
|
|||||||
from modules.PeerJob import PeerJob
|
from modules.PeerJob import PeerJob
|
||||||
from modules.SystemStatus import SystemStatus
|
from modules.SystemStatus import SystemStatus
|
||||||
from modules.PeerShareLinks import PeerShareLinks
|
from modules.PeerShareLinks import PeerShareLinks
|
||||||
|
from modules.DashboardAPIKey import DashboardAPIKey
|
||||||
SystemStatus = SystemStatus()
|
SystemStatus = SystemStatus()
|
||||||
|
|
||||||
from sqlalchemy_utils import database_exists, create_database
|
from sqlalchemy_utils import database_exists, create_database
|
||||||
@@ -233,7 +234,6 @@ class PeerJobs:
|
|||||||
return x > y
|
return x > y
|
||||||
if operator == "lst":
|
if operator == "lst":
|
||||||
return x < y
|
return x < y
|
||||||
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
WireGuard Configuration
|
WireGuard Configuration
|
||||||
@@ -1679,17 +1679,6 @@ PersistentKeepalive = {str(self.keepalive)}
|
|||||||
except subprocess.CalledProcessError as exc:
|
except subprocess.CalledProcessError as exc:
|
||||||
return ResponseObject(False, exc.output.decode("UTF-8").strip())
|
return ResponseObject(False, exc.output.decode("UTF-8").strip())
|
||||||
|
|
||||||
"""
|
|
||||||
Dashboard API Key
|
|
||||||
"""
|
|
||||||
class DashboardAPIKey:
|
|
||||||
def __init__(self, Key: str, CreatedAt: str, ExpiredAt: str):
|
|
||||||
self.Key = Key
|
|
||||||
self.CreatedAt = CreatedAt
|
|
||||||
self.ExpiredAt = ExpiredAt
|
|
||||||
|
|
||||||
def toJson(self):
|
|
||||||
return self.__dict__
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Dashboard Configuration
|
Dashboard Configuration
|
||||||
|
11
src/modules/DashboardAPIKey.py
Normal file
11
src/modules/DashboardAPIKey.py
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
"""
|
||||||
|
Dashboard API Key
|
||||||
|
"""
|
||||||
|
class DashboardAPIKey:
|
||||||
|
def __init__(self, Key: str, CreatedAt: str, ExpiredAt: str):
|
||||||
|
self.Key = Key
|
||||||
|
self.CreatedAt = CreatedAt
|
||||||
|
self.ExpiredAt = ExpiredAt
|
||||||
|
|
||||||
|
def toJson(self):
|
||||||
|
return self.__dict__
|
Reference in New Issue
Block a user