Browse Source

fix ChannelFilter.Logged being ignored in postgres driver.

master 2.2.2
Gisle Aune 10 months ago
parent
commit
b117aea7f0
  1. 16
      .drone.yml
  2. 4
      database/postgres/channel.go

16
.drone.yml

@ -10,6 +10,20 @@ steps:
- go generate ./...
- 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
image: plugins/docker
settings:
@ -36,4 +50,4 @@ steps:
registry: r.vmaple.dev
when:
event:
- tag
- tag

4
database/postgres/channel.go

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

Loading…
Cancel
Save