0
0
Fork 0
mirror of https://github.com/matrix-org/dendrite synced 2024-09-22 19:09:00 +02:00

Fix bug in devices endpoint (#877)

This commit is contained in:
Neil Alexander 2020-02-28 15:06:16 +00:00 committed by GitHub
parent 6460b3725d
commit 72565f2eeb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 2 deletions

View file

@ -26,4 +26,5 @@ type Device struct {
// associated with access tokens.
SessionID int64
// TODO: display name, last used timestamp, keys, etc
DisplayName string
}

View file

@ -230,7 +230,7 @@ func (s *devicesStatements) selectDevicesByLocalpart(
for rows.Next() {
var dev authtypes.Device
err = rows.Scan(&dev.ID)
err = rows.Scan(&dev.ID, &dev.DisplayName)
if err != nil {
return devices, err
}

View file

@ -231,7 +231,7 @@ func (s *devicesStatements) selectDevicesByLocalpart(
for rows.Next() {
var dev authtypes.Device
err = rows.Scan(&dev.ID)
err = rows.Scan(&dev.ID, &dev.DisplayName)
if err != nil {
return devices, err
}