diff --git a/Dockerfile b/Dockerfile index db80f07..5d203d3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,4 +17,5 @@ WORKDIR /app COPY --from=builder /app/bin/us-dop-api /usr/bin/ COPY --from=builder /app/assets/ /app/assets/ RUN apk add --no-cache tzdata + ENTRYPOINT /usr/bin/us-dop-api diff --git a/internal/helpers/timehelpers.go b/internal/helpers/timehelpers.go index 2c4aa1b..1c134a1 100644 --- a/internal/helpers/timehelpers.go +++ b/internal/helpers/timehelpers.go @@ -14,13 +14,13 @@ func ParseTimeAmount(timeFrame, timeAmount string) (timeSearch time.Duration, er switch timeFrame { case "hour": - timeSearch = 60 * 1 * time.Duration(timeInt) * time.Hour + timeSearch = time.Duration(timeInt) * time.Hour case "day": - timeSearch = 60 * 24 * time.Duration(timeInt) * time.Hour + timeSearch = 24 * time.Duration(timeInt) * time.Hour case "week": - timeSearch = (60 * 24 * 7 * time.Duration(timeInt)) * time.Hour + timeSearch = (24 * 7 * time.Duration(timeInt)) * time.Hour case "month": - timeSearch = (60 * 24 * 7 * 4) * time.Hour + timeSearch = (24 * 7 * 4) * time.Hour default: } return timeSearch, err