(This is a serious bug that should've been tested on #7, and perharps this is the time to create unit tests...)
company_id isn't being respected. This can be simulated by creating two companies, registering a user in one of them, and listing the users on both companies. The same user is appearing on both, so the company_id filter isn't working at all.
This could be a bug while generating the query. To simulate that, printing the queries on console could be a good thing to do.
It was noted on internal/connection/database.go that there is a logger being configured through SlogGorm, but query logging isn't implemented. Perharps it would be a good idea to do that according to log level.
(This is a serious bug that should've been tested on #7, and perharps this is the time to create unit tests...)
company_id
isn't being respected. This can be simulated by creating two companies, registering a user in one of them, and listing the users on both companies. The same user is appearing on both, so thecompany_id
filter isn't working at all.This could be a bug while generating the query. To simulate that, printing the queries on console could be a good thing to do.
It was noted on
internal/connection/database.go
that there is a logger being configured through SlogGorm, but query logging isn't implemented. Perharps it would be a good idea to do that according to log level.Gorm documentation on logging: https://gorm.io/docs/logger.html