major change of websocket dbmHandler structure

This commit is contained in:
Adrian Zürcher
2025-04-23 21:53:01 +02:00
parent a1f947e24a
commit 0a137c9d86
35 changed files with 1676 additions and 424 deletions

27
server/jsonRequest.go Normal file
View File

@@ -0,0 +1,27 @@
package server
import (
"net/http"
"github.com/gin-gonic/gin"
"github.com/zuadi/tecamino-dbm/models"
)
func (s *Server) JsonRequest(c *gin.Context) {
var payload models.JsonData
if err := c.BindJSON(&payload); err != nil {
c.JSON(http.StatusBadRequest, gin.H{"error": err.Error()})
return
}
if payload.Set != nil {
}
c.JSON(200, gin.H{
"name": payload,
})
return
}