fix timing issue
All checks were successful
dev test / test (push) Successful in 23s
dev test / vulnCheck (push) Successful in 29s
dev test / Ci-Lint (push) Successful in 27s
${{ github.actor }} executed Build Push Prod / build (push) Successful in 3m25s
${{ github.actor }} executed Build Push Prod / deploy (push) Successful in 20s

This commit is contained in:
maximo tejeda 2024-12-13 11:12:34 -04:00
parent 2ffdb3fdba
commit 8dae98db2b
2 changed files with 5 additions and 4 deletions

View File

@ -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

View File

@ -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