add tysc handlers to kontor-gin

This commit is contained in:
2026-09-30 04:12:03 +02:00
parent c848758821
commit f912dcb670
100 changed files with 2420 additions and 1064 deletions
@@ -0,0 +1,21 @@
package handlers
import (
"kontor-api-gin/internal/service"
"net/http"
"github.com/gin-gonic/gin"
)
type PermissionHandler struct {
Service *service.PermissionService
}
func (handler *PermissionHandler) List(c *gin.Context) {
permissions, err := handler.Service.List(c.Request.Context())
if err != nil {
c.JSON(http.StatusInternalServerError, gin.H{"error": err.Error()})
return
}
c.JSON(http.StatusOK, permissions)
}