Skip to content

Customer: consolidate GetCustomerCompanyId onto auth helper #378

Description

@CryptoJones

Summary

GetCustomerCompanyId in customercontroller.js uses raw sequelize.query, while auth.js uses Sequelize models + defaultScope. Behavior should match, but the split increases maintenance cost.

Proposed fix

Replace raw SQL with auth.getCompanyIdByCustomerId() (or shared helper).

Acceptance criteria

  • No raw SQL for customer company lookup in customer controller
  • Existing customer auth tests pass

Source

Code review backlog (2026-06-23)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions