Skip to content
This repository was archived by the owner on Mar 2, 2026. It is now read-only.
This repository was archived by the owner on Mar 2, 2026. It is now read-only.

Major: Debug Console.log Left in Production Code #8

@AliiiBenn

Description

@AliiiBenn

Priority

🟠 Major - Code Quality & Security

Location

src/api/courses/index.ts:124

Problem Description

A debug console.log() statement was left in production code:

export async function updateProgress({...}) {
  const payload = await getPayload({ config })

  console.log(userId)  // ← Debug statement in production

  const existing = await payload.find({...})
}

Impact

  • Performance: Unnecessary logging in production
  • Security: Logs may contain sensitive user IDs
  • Noise: Pollutes production logs
  • Memory: Each log consumes memory
  • Anti-pattern: Suggests poor code review process

Expected Behavior

Remove the debug statement or use a proper logger for production.

Related Issues

Steps to Fix

  1. Remove the console.log(userId) statement
  2. Search codebase for other console.log statements
  3. Add ESLint no-console rule
  4. Set up pre-commit hook
  5. Consider adding structured logging

Additional Context

While this seems minor, it's indicative of a larger issue: the codebase lacks proper logging infrastructure and code review processes.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions