Repository navigation
Conversation
- user-repository.ts: getActiveIds returns which of the given ids exist and are active. - notification-controller.ts: the group and general manual notifications answer 400 NOTIFICATIONS_INVALID_RECIPIENTS when any recipient is inactive or unknown, before anything is written. - error-codes.ts, errors.json (es, en), errorCodeMessage.ts: the new code and its texts. - manual-recipients.test.ts: both endpoints refuse a bad recipient, send to active ones and skip the lookup without userIds. Why: an inactive user got the notice, and an unknown id broke the recipients insert after the notification was created. Checked with curl against the local database: unknown or mixed ids answer 400, an active one 201.
…test - manual-recipients.test.ts: mock config/db.js, which the controller loads through NotificationRepository. Why: CI has no backend/.env, so loading the pool config threw "Falta LOCAL_DB_PASSWORD" and the file failed before any test ran; locally the .env hid it. Reproduced with LOCAL_DB_PASSWORD empty; now the whole suite passes that way.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cambios
NOTIFICATIONS_INVALID_RECIPIENTSsi algún destinatario está inactivo o no existe, antes de escribir nada.Por qué
Un usuario inactivo recibía el aviso, y un id desconocido rompía la inserción de destinatarios después de crear la notificación.