fix(pglite): join user_account in the share repository

The user table was renamed to user_account for PostgreSQL (user is a
reserved word), but the share list still joined 'user' and returned 500.
This commit is contained in:
Deluan 2026-09-05 02:16:00 -04:00
commit 088a4131b8

View file

@ -35,7 +35,7 @@ func (r *shareRepository) Delete(id string) error {
}
func (r *shareRepository) selectShare(options ...model.QueryOptions) SelectBuilder {
return r.newSelect(options...).Join("user u on u.id = share.user_id").
return r.newSelect(options...).Join("user_account u on u.id = share.user_id").
Columns("share.*", "user_name as username").
Where(r.addRestriction())
}