mirror of
https://github.com/cjdenio/uta-trax-api.git
synced 2026-12-01 00:26:25 +00:00
Compare commits
2
Commits
a8dafa828f
...
d6cdb328c0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d6cdb328c0 | ||
|
|
4296875b9f |
No files matched your search
@@ -1,6 +1,6 @@
|
|||||||
all: bin
|
all: bin
|
||||||
|
|
||||||
bin: cmd/main.go proto/*.go
|
bin: cmd/main.go proto/*.go pkg/**/*.go
|
||||||
go build -o bin cmd/main.go
|
go build -o bin cmd/main.go
|
||||||
|
|
||||||
proto: proto/schema.pb.go proto/gtfs-realtime.pb.go
|
proto: proto/schema.pb.go proto/gtfs-realtime.pb.go
|
||||||
|
|||||||
+4
-2
@@ -19,9 +19,11 @@ func GetActiveServiceIDs(t *time.Time, db *sql.DB) ([]string, error) {
|
|||||||
when 5 then friday
|
when 5 then friday
|
||||||
when 6 then saturday
|
when 6 then saturday
|
||||||
end
|
end
|
||||||
) AND $2 >= start_date AND $2 <= end_date
|
) AND $2 >= start_date AND $2 <= end_date AND NOT EXISTS (
|
||||||
|
SELECT calendar_dates.service_id FROM calendar_dates WHERE calendar_dates.service_id = calendar.service_id AND calendar_dates.date = $2 AND calendar_dates.exception_type = 2
|
||||||
|
)
|
||||||
union
|
union
|
||||||
select service_id from calendar_dates where date = $2;`, weekday, t.Format("20060102"))
|
select service_id from calendar_dates where date = $2 AND exception_type = 1;`, weekday, t.Format("20060102"))
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
|||||||
Reference in new issue
Block a user