Update Filter

This commit is contained in:
aditya.siregar
2024-07-30 19:38:23 +07:00
parent 065cfc4df6
commit c7495b8bff
7 changed files with 32 additions and 11 deletions
+4 -2
View File
@@ -24,7 +24,7 @@ func (h *Handler) Route(group *gin.RouterGroup, jwt gin.HandlerFunc) {
isSuperAdmin := middlewares.SuperAdminMiddleware()
route.POST("/", jwt, isSuperAdmin, h.Create)
route.GET("/list", jwt, isSuperAdmin, h.GetAll)
route.GET("/list", jwt, h.GetAll)
route.PUT("/:id", jwt, isSuperAdmin, h.Update)
route.GET("/:id", jwt, isSuperAdmin, h.GetByID)
route.DELETE("/:id", jwt, isSuperAdmin, h.Delete)
@@ -140,7 +140,9 @@ func (h *Handler) GetAll(c *gin.Context) {
return
}
Partners, total, err := h.service.GetAll(c.Request.Context(), req.ToEntity())
ctx := request.GetMyContext(c)
Partners, total, err := h.service.GetAll(c.Request.Context(), req.ToEntity(ctx))
if err != nil {
response.ErrorWrapper(c, err)
return