diff --git a/README.md b/README.md index 177bcd0..fa51291 100644 --- a/README.md +++ b/README.md @@ -267,10 +267,12 @@ JWT_REFRESH_TOKEN_TTL=168h ### Cloud Deployment #### Railway -[![Deploy on Railway](https://railway.app/button.svg)](https://railway.app/template/your-template-id) +> **Note:** Railway telah menghentikan dukungan untuk template deployment gratis. Silakan gunakan opsi lain di bawah ini atau deploy secara manual. + +[![Deploy on Railway](https://railway.app/button.svg)](https://railway.app/new) #### Render -[![Deploy to Render](https://render.com/images/deploy-to-render-button.svg)](https://render.com/deploy) +[![Deploy to Render](https://render.com/images/deploy-to-render-button.svg)](https://render.com/deploy?repo=https://github.com/ilramdhan/holidayapi) #### Fly.io ```bash diff --git a/internal/repository/holiday_repository.go b/internal/repository/holiday_repository.go index 46be497..1b4f596 100644 --- a/internal/repository/holiday_repository.go +++ b/internal/repository/holiday_repository.go @@ -3,6 +3,7 @@ package repository import ( "database/sql" "fmt" + "strconv" "strings" "time" @@ -89,17 +90,17 @@ func (r *holidayRepository) GetAll(filter models.HolidayFilter) ([]models.Holida if filter.Year != nil { whereConditions = append(whereConditions, "strftime('%Y', date) = ?") - args = append(args, fmt.Sprintf("%d", *filter.Year)) + args = append(args, strconv.Itoa(*filter.Year)) } if filter.Month != nil { whereConditions = append(whereConditions, "strftime('%m', date) = ?") - args = append(args, fmt.Sprintf("%02d", *filter.Month)) + args = append(args, strconv.Itoa(*filter.Month)) } if filter.Day != nil { whereConditions = append(whereConditions, "strftime('%d', date) = ?") - args = append(args, fmt.Sprintf("%02d", *filter.Day)) + args = append(args, strconv.Itoa(*filter.Day)) } if filter.Type != nil { diff --git a/pkg/client/client.go b/pkg/client/client.go index 1eaf023..4119d28 100644 --- a/pkg/client/client.go +++ b/pkg/client/client.go @@ -6,6 +6,7 @@ import ( "encoding/json" "fmt" "net/http" + "strconv" "time" ) @@ -101,10 +102,10 @@ func (c *Client) GetHolidays(ctx context.Context, year, month *int, holidayType q := req.URL.Query() if year != nil { - q.Add("year", fmt.Sprintf("%d", *year)) + q.Add("year", strconv.Itoa(*year)) } if month != nil { - q.Add("month", fmt.Sprintf("%d", *month)) + q.Add("month", strconv.Itoa(*month)) } if holidayType != "" { q.Add("type", holidayType)