From a5b69521c842dd4af30ab1673721ee3fd930b7dc Mon Sep 17 00:00:00 2001 From: Andre Medeiros Date: Mon, 26 Jul 2021 13:06:50 -0400 Subject: [PATCH] fix query --- internal/api/devices.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/api/devices.go b/internal/api/devices.go index b0cd243..b3c0a5b 100644 --- a/internal/api/devices.go +++ b/internal/api/devices.go @@ -46,7 +46,7 @@ func (a *api) testDeviceHandler(w http.ResponseWriter, r *http.Request, ps httpr SELECT username FROM accounts INNER JOIN devices_accounts ON devices.account_id = accounts.id - WHERE devices_accounts.device = $1` + WHERE devices_accounts.device_id = $1` rows, err := a.db.Query(ctx, stmt, d.ID) if err != nil { a.logger.WithFields(logrus.Fields{