Browse Source

fix ChannelFilter.Logged being ignored in postgres driver.

master 2.2.2
Gisle Aune 4 years ago
parent
commit
b117aea7f0
  1. 14
      .drone.yml
  2. 4
      database/postgres/channel.go

14
.drone.yml

@ -10,6 +10,20 @@ steps:
- go generate ./... - go generate ./...
- go test -v ./... - go test -v ./...
# - name: postgres-migrate
# image: golang:1.15
# depends_on: []
# environment:
# DB_CONNECT:
# from_secret: db_connect
# commands:
# - go get -u github.com/pressly/goose/...
# - cd migrations/postgres
# - goose postgres "$DB_CONNECT" up
# when:
# event:
# - tag
- name: docker-release-tag - name: docker-release-tag
image: plugins/docker image: plugins/docker
settings: settings:

4
database/postgres/channel.go

@ -38,6 +38,10 @@ func (r *channelRepository) List(ctx context.Context, filter models.ChannelFilte
params.FilterEventName = true params.FilterEventName = true
params.EventName = *filter.EventName params.EventName = *filter.EventName
} }
if filter.Logged != nil {
params.FilterLogged = true
params.Logged = *filter.Logged
}
if filter.Limit > 0 { if filter.Limit > 0 {
params.LimitSize = int32(filter.Limit) params.LimitSize = int32(filter.Limit)
} }

Loading…
Cancel
Save