Skip to content

Commit

Permalink
#35 add key auth
Browse files Browse the repository at this point in the history
  • Loading branch information
kynmh69 committed Oct 13, 2024
1 parent 370bef3 commit 7fff420
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/api/handler/is_holiday.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"net/http"
"time"

"github.com/doug-martin/goqu/v9"
"github.com/gin-gonic/gin"

"github.com/kynmh69/go-ja-holidays/database"
Expand All @@ -32,15 +31,11 @@ func IsHoliday(c *gin.Context) {
BadRequestJson(c, err.Error())
return
}
logger.Debug(request.Date)

// Set the time zone to JST.
loc := request.Date.Location()
goqu.SetTimeLocation(loc)
logger.Debug("requested date ", request.Date)

// Get the holiday data for the specified day.
holiday.Date = request.Date
result := db.First(&holiday)
result := db.Where(&holiday).Take(&holiday)
err := result.Error

var isHoliday model.IsHoliday
Expand Down

0 comments on commit 7fff420

Please sign in to comment.