mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-24 21:42:51 -05:00
core/server: refactory to use shared params/request structs
This commit is contained in:
@@ -29,3 +29,9 @@ func Respond[T any](conn net.Conn, id int, result T) {
|
||||
resp := Response[T]{ID: id, Result: &result}
|
||||
json.NewEncoder(conn).Encode(resp)
|
||||
}
|
||||
|
||||
type SuccessResult struct {
|
||||
Success bool `json:"success"`
|
||||
Message string `json:"message,omitempty"`
|
||||
Value string `json:"value,omitempty"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user