Files
houston-be/cmd/app/handler/user_handler.go
Vijay Joshi 8cd72b46a3 INFRA-2887 : Upsert users cron refactor (#412)
* INFRA-2887 : Upsert users cron refactor

* INFRA-2887 : Review changes

* INFRA-2887 : added UT's

* INFRA-2887 : Second round review changes

* INFRA-2887 : Add default ack

* INFRA-2887 : Add default ack

* INFRA-2887 : make flow async
2024-04-02 16:25:34 +05:30

23 lines
573 B
Go

package handler
import (
"github.com/gin-gonic/gin"
common "houston/service/response/common"
userService "houston/service/user"
"net/http"
)
type UserHandler struct {
gin *gin.Engine
service userService.UserService
}
func NewUserHandler(gin *gin.Engine, service userService.UserService) *UserHandler {
return &UserHandler{gin: gin, service: service}
}
func (handler *UserHandler) HandleUpsertHoustonUsers(c *gin.Context) {
handler.service.UpsertUsers()
c.JSON(http.StatusOK, common.SuccessResponse("Acknowledged request to upsert users", http.StatusOK))
}