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
..
2024-06-05 19:54:25 -04:00
2022-12-28 15:31:56 -05:00
2020-10-21 21:44:03 -04:00
2023-03-10 23:33:29 -05:00
2023-12-27 12:44:25 -05:00
2022-12-28 15:31:56 -05:00
2023-12-09 13:52:17 -05:00
2024-05-19 21:55:19 -04:00
2023-12-09 13:52:17 -05:00