v0.7.1 client readline removed for cross-platform compatibility with wasm, client logic fix fixes and refactor
This commit is contained in:
@ -25,7 +25,7 @@ func validationMiddleware(c *fiber.Ctx) error {
|
||||
|
||||
// Determine request type based on path
|
||||
path := c.Path()
|
||||
var requestType interface{}
|
||||
var requestType any
|
||||
|
||||
switch {
|
||||
case strings.HasSuffix(path, "/games") && method == fiber.MethodPost:
|
||||
|
||||
@ -22,15 +22,15 @@ const (
|
||||
type Command struct {
|
||||
Type CommandType
|
||||
UserID string
|
||||
GameID string // For game-specific commands
|
||||
Args interface{} // Command-specific arguments
|
||||
GameID string // For game-specific commands
|
||||
Args any // Command-specific arguments
|
||||
}
|
||||
|
||||
// ProcessorResponse wraps the response with metadata
|
||||
type ProcessorResponse struct {
|
||||
Success bool `json:"success"`
|
||||
Pending bool `json:"pending,omitempty"` // For async operations
|
||||
Data interface{} `json:"data,omitempty"`
|
||||
Data any `json:"data,omitempty"`
|
||||
Error *core.ErrorResponse `json:"error,omitempty"`
|
||||
}
|
||||
|
||||
|
||||
@ -93,7 +93,7 @@ func (s *Store) QueryGames(gameID, playerID string) ([]GameRecord, error) {
|
||||
start_time_utc
|
||||
FROM games WHERE 1=1`
|
||||
|
||||
var args []interface{}
|
||||
var args []any
|
||||
|
||||
// Handle gameID filtering
|
||||
if gameID != "" && gameID != "*" {
|
||||
|
||||
@ -45,7 +45,7 @@ func (s *Store) CreateUser(record UserRecord) error {
|
||||
func (s *Store) userExists(tx *sql.Tx, username, email string) (bool, error) {
|
||||
var count int
|
||||
query := `SELECT COUNT(*) FROM users WHERE username = ? COLLATE NOCASE`
|
||||
args := []interface{}{username}
|
||||
args := []any{username}
|
||||
|
||||
if email != "" {
|
||||
query = `SELECT COUNT(*) FROM users WHERE username = ? COLLATE NOCASE OR email = ? COLLATE NOCASE`
|
||||
|
||||
Reference in New Issue
Block a user