1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-27 06:52:50 -05:00

core/server: refactory to use shared params/request structs

This commit is contained in:
bbedward
2025-12-09 14:13:20 -05:00
parent 993f14a31f
commit 85968ec417
23 changed files with 913 additions and 953 deletions

View File

@@ -6,13 +6,7 @@ import (
"github.com/AvengeMedia/DankMaterialShell/core/internal/server/models"
)
type Request struct {
ID int `json:"id"`
Method string `json:"method"`
Params map[string]any `json:"params"`
}
func HandleRequest(conn net.Conn, req Request, manager *Manager) {
func HandleRequest(conn net.Conn, req models.Request, manager *Manager) {
switch req.Method {
case "browser.open":
url, ok := req.Params["url"].(string)