diff --git a/api/location.go b/api/location.go index f16fef3..368fbdc 100644 --- a/api/location.go +++ b/api/location.go @@ -12,7 +12,7 @@ import ( "git.nochill.in/nochill/hiling_go/util" "github.com/gin-gonic/gin" "github.com/lib/pq" - "github.com/yiplee/sqlc" + ysqlc "github.com/yiplee/sqlc" ) type createLocationReq struct { @@ -96,7 +96,7 @@ func (server *Server) getListLocations(ctx *gin.Context) { return } - locations, err := server.Store.GetListLocations(sqlc.Build(ctx, func(builder *sqlc.Builder) { + locations, err := server.Store.GetListLocations(ysqlc.Build(ctx, func(builder *ysqlc.Builder) { builder.Limit(int(req.PageSize)) builder.Offset(int(req.Page-1) * int(req.PageSize)) builder.Order("created_at ASC")