mirror of
https://github.com/lejianwen/rustdesk-api.git
synced 2026-02-11 16:51:07 +00:00
feat: Add start time in /api/sysinfover
This commit is contained in:
@@ -3,13 +3,14 @@ package service
|
||||
import (
|
||||
"os"
|
||||
"sync"
|
||||
"time"
|
||||
)
|
||||
|
||||
type AppService struct {
|
||||
}
|
||||
|
||||
var version = ""
|
||||
|
||||
var startTime = ""
|
||||
var once = &sync.Once{}
|
||||
|
||||
func (a *AppService) GetAppVersion() string {
|
||||
@@ -26,3 +27,13 @@ func (a *AppService) GetAppVersion() string {
|
||||
})
|
||||
return version
|
||||
}
|
||||
|
||||
func init() {
|
||||
// Initialize the AppService if needed
|
||||
startTime = time.Now().Format("2006-01-02 15:04:05")
|
||||
}
|
||||
|
||||
// GetStartTime
|
||||
func (a *AppService) GetStartTime() string {
|
||||
return startTime
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user