versions
This commit is contained in:
@@ -21,6 +21,8 @@ import (
|
||||
"github.com/go-rod/rod/lib/proto"
|
||||
)
|
||||
|
||||
const Version = "2.0.0"
|
||||
|
||||
// Daemon is the main server that manages browser connections
|
||||
type Daemon struct {
|
||||
browser *rod.Browser
|
||||
@@ -226,6 +228,12 @@ func (d *Daemon) handleCommand(w http.ResponseWriter, r *http.Request) {
|
||||
var response Response
|
||||
|
||||
switch cmd.Action {
|
||||
case "version":
|
||||
response = Response{
|
||||
Success: true,
|
||||
Data: Version,
|
||||
}
|
||||
|
||||
case "open-tab":
|
||||
timeoutStr := cmd.Params["timeout"]
|
||||
|
||||
|
Reference in New Issue
Block a user