Skip to content

Product route: Missing radix parameter on parseInt calls #19

@thomasiverson

Description

@thomasiverson

Severity: Low

Category: Maintainability

Description

In api/src/routes/product.ts, parseInt(req.params.id) is called without an explicit radix. While modern engines default to base 10, best practice is to always pass radix 10 to avoid edge cases.

Suggested Fix

// Before
parseInt(req.params.id)

// After
parseInt(req.params.id, 10)

Affected File

  • api/src/routes/product.ts (lines 109, 114, 123)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions