navidrome/model
Kendall Garner fa85e2a781
Use userId in player, other fixes (#3182)
* [bugfix] player: use userId, other fixes

This PR primarily resolves #1928 by switching the foreign key of `player` from `user.user_name` to `user.id`.
There are also a few other fixes/changes:

- For some bizarre reason, `ip_address` is never returned from `read`/`get`. Change the field to `ip`, which works. Somehow
- Update `players_test.go` mock to also check for user agent, replicating the actual code
- Update `player_repository.go` `isPermitted` to check user id. I don't know how this worked before...
- tests!
- a few places referred to `typ`, when it is really `userAgent`. Change the field names

* baseRequest -> selectPlayer

* remove comment

* update migration, make all of persistence foreign key enabled

* maybe don't forget to save the file first
2024-08-03 13:37:21 -04:00
..
criteria Fix tests expectations 2024-06-05 19:54:25 -04:00
request
album.go Don't expose fullText data in the Native API 2024-06-09 11:19:22 -04:00
album_test.go
annotation.go
artist.go Don't expose fullText data in the Native API 2024-06-09 11:19:22 -04:00
artist_info.go
artwork_id.go
artwork_id_test.go
bookmark.go
datastore.go Make first WebUI random page stick 2024-05-19 12:35:30 -04:00
errors.go
file_types.go
file_types_test.go
genre.go
get_entity.go
library.go Associate main entities with library 2024-05-12 21:37:42 -04:00
lyrics.go Refactor string utilities into its own package str 2024-06-05 22:09:27 -04:00
lyrics_test.go
mediafile.go Don't expose fullText data in the Native API 2024-06-09 11:19:22 -04:00
mediafile_internal_test.go
mediafile_test.go
model_suite_test.go
player.go Use userId in player, other fixes (#3182) 2024-08-03 13:37:21 -04:00
playlist.go
playlists_test.go
playqueue.go
properties.go Associate main entities with library 2024-05-12 21:37:42 -04:00
radio.go
scrobble_buffer.go
share.go Fix G404 gosec lint error 2024-05-19 21:55:19 -04:00
transcoding.go
user.go
user_props.go