From 0d05bf473ba8e8b64a9e1b0977898581c5a3137d Mon Sep 17 00:00:00 2001 From: tobi <31960611+tsmethurst@users.noreply.github.com> Date: Sun, 24 Apr 2022 14:24:43 +0200 Subject: [bug] Fix status API / status web API being case sensitive (#481) * make getStatus by id case-insensitive * test get status case insensitive * init config before log --- internal/db/bundb/status.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'internal/db') diff --git a/internal/db/bundb/status.go b/internal/db/bundb/status.go index d564ed528..1783723bb 100644 --- a/internal/db/bundb/status.go +++ b/internal/db/bundb/status.go @@ -70,7 +70,7 @@ func (s *statusDB) GetStatusByID(ctx context.Context, id string) (*gtsmodel.Stat return s.cache.GetByID(id) }, func(status *gtsmodel.Status) error { - return s.newStatusQ(status).Where("status.id = ?", id).Scan(ctx) + return s.newStatusQ(status).Where("LOWER(status.id) = LOWER(?)", id).Scan(ctx) }, ) } -- cgit v1.2.3