lib/invites_repo.rb 🔗
@@ -18,7 +18,7 @@ class InvitesRepo
@trust_level_repo.find(customer).then { |tl|
next [] unless tl.invite?
- @db.query_defer(<<~SQL, [customer_id])
+ @db.query_defer(<<~SQL, [customer.customer_id])
SELECT code FROM unused_invites WHERE creator_id=$1
SQL
}.then { |result| result.map { |row| row["code"] } }