Fix type and name switching in connected things (#376)

Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
This commit is contained in:
Aleksandar Novaković 2018-08-29 14:28:56 +02:00 committed by Nikola Marčetić
parent 4ca443038d
commit 902630fb14
1 changed files with 1 additions and 1 deletions

View File

@ -75,7 +75,7 @@ func (cr channelRepository) RetrieveByID(owner string, id uint64) (things.Channe
return empty, err
}
q = `SELECT id, type, name, key, metadata FROM things t
q = `SELECT id, name, type, key, metadata FROM things t
INNER JOIN connections conn
ON t.id = conn.thing_id AND t.owner = conn.thing_owner
WHERE conn.channel_id = $1 AND conn.channel_owner = $2`