* 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
23 lines
573 B
Go
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))
|
|
}
|