BUG: upload.js imports from non-existent ../middleware/requireAuth.js — server crashes on startup if rebuilt #88
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description
services/mam-api/src/routes/upload.jsline 1 contains:The file
services/mam-api/src/middleware/requireAuth.jsdoes not exist. The middleware file isauth.jswith a named export:The correct import (used by every other route file —
cluster.js,jobs.js,metrics.js, etc.) is:Impact: Node.js ES module static imports fail eagerly. If the Docker image is rebuilt from the current repo,
mam-apiwill crash on startup with:The current live deployment is unaffected only because the running image was compiled before this regression was introduced.
Compounding issue: Even if
requireAuth.jsexisted,requireAuthis imported but never used inupload.js— no route handler passes it as middleware. See related issue #86 for the auth gap.Fix:
Then apply it to the upload routes (see #86).