package adminrefertimehandler import ( "net/http" refertimeparam "git.gocasts.ir/ebhomengo/niki/param/admin/refer_time" httpmsg "git.gocasts.ir/ebhomengo/niki/pkg/http_msg" echo "github.com/labstack/echo/v4" ) // GetAll godoc // @Summary Get all refer times // @Tags Admins ReferTimes // @Accept json // @Produce json // @Success 200 {object} adminrefertimeparam.GetAllReferTimeResponse // @Failure 400 {string} "Bad request" // @Security AuthBearerAdmin // @Router /admins/refer-times [get]. func (h Handler) GetAll(c echo.Context) error { var req refertimeparam.GetAllReferTimeRequest listCities, err := h.adminReferTimeSvc.GetAll(c.Request().Context(), req) if err != nil { msg, code := httpmsg.Error(err) return echo.NewHTTPError(code, msg) } return c.JSON(http.StatusOK, listCities) }