summaryrefslogtreecommitdiff
path: root/internal/openvpn.go
diff options
context:
space:
mode:
authorjwijenbergh <jeroenwijenbergh@protonmail.com>2022-06-17 14:00:24 +0200
committerjwijenbergh <jeroenwijenbergh@protonmail.com>2022-06-17 14:00:24 +0200
commit6dc7b64f634f6dcbeedea24c741382366a3c7b8c (patch)
tree0b7bfc18de40e48f6b6fd9d349915a15fd45f9a3 /internal/openvpn.go
parent50ca9ce15aaaeefc564da38c88bba82e73d1e570 (diff)
API: Parse expiry
Diffstat (limited to 'internal/openvpn.go')
-rw-r--r--internal/openvpn.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/internal/openvpn.go b/internal/openvpn.go
index 7c4df18..8f684ba 100644
--- a/internal/openvpn.go
+++ b/internal/openvpn.go
@@ -9,7 +9,11 @@ func OpenVPNGetConfig(server Server) (string, string, error) {
return "", "", &OpenVPNGetConfigError{Err: baseErr}
}
profile_id := base.Profiles.Current
- configOpenVPN, _, configErr := APIConnectOpenVPN(server, profile_id)
+ configOpenVPN, expires, configErr := APIConnectOpenVPN(server, profile_id)
+
+ // Store start and end time
+ base.StartTime = GenerateTimeSeconds()
+ base.EndTime = expires
if configErr != nil {
return "", "", &OpenVPNGetConfigError{Err: configErr}