mirror of
https://github.com/pikami/cosmium.git
synced 2025-12-19 17:00:37 +00:00
Refactor to support multiple server instances in shared library
This commit is contained in:
@@ -5,15 +5,14 @@ import (
|
||||
"net/http"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/pikami/cosmium/internal/repositories"
|
||||
repositorymodels "github.com/pikami/cosmium/internal/repository_models"
|
||||
)
|
||||
|
||||
func GetAllTriggers(c *gin.Context) {
|
||||
func (h *Handlers) GetAllTriggers(c *gin.Context) {
|
||||
databaseId := c.Param("databaseId")
|
||||
collectionId := c.Param("collId")
|
||||
|
||||
triggers, status := repositories.GetAllTriggers(databaseId, collectionId)
|
||||
triggers, status := h.repository.GetAllTriggers(databaseId, collectionId)
|
||||
|
||||
if status == repositorymodels.StatusOk {
|
||||
c.Header("x-ms-item-count", fmt.Sprintf("%d", len(triggers)))
|
||||
|
||||
Reference in New Issue
Block a user