Repository: freeCodeCamp/freeCodeCamp
File: api/src/routes/protected/certificate.ts (TypeScript)

Code before:
          isPythonCertV9: true,
          isQaCertV7: true,
          isRelationalDatabaseCertV8: true,
          isRelationalDatabaseCertV9: true,
          isRespWebDesignCert: true,
          isRespWebDesignCertV9: true,
          isSciCompPyCertV7: true
        }
      });

      const email = updatedUser.email;
      const updatedUserSansNull = removeNulls(updatedUser);
      const updatedIsCertMap = getUserIsCertMap(updatedUserSansNull);

      // TODO(POST-MVP): Consider sending email based on `user.isEmailVerified` as well
      const fullStackV9Claimed = updatedIsCertMap.isFullStackDeveloperCertV9;

      const shouldSendCertifiedEmailToCamper =
        email && validator.default.isEmail(email) && fullStackV9Claimed;

      if (shouldSendCertifiedEmailToCamper) {
        const notifyUser = {
          to: email,
          from: 'quincy@freecodecamp.org',
          subject:
            'Congratulations on completing the Certified Full Stack Developer Certification!',
          text: renderCertifiedEmail({
            username: updatedUser.username,
            // Safety: `user.name` is required to exist earlier. TODO: Assert
            name: updatedUser.name as string
          })
        };

        // Failed email should not prevent successful response.
        try {
          logger.info(`Sending congratulations email to ${user.id}`);
          // TODO(POST-MVP): Ensure Camper knows they **have** claimed the cert, but the email failed to send.
          await fastify.sendEmail(notifyUser);
        } catch (e) {
          logger.error(e);
          fastify.Sentry.captureException(e);
        }
      }

      logger.info(`${user.id} has claimed ${certName}`);
      void reply.code(200);
      return {
        response: {
          type: 'success',
          message: 'flash.cert-claim-success',
          variables: {

Review comment (suggestion):
I am sorry for the nitpick, but what about:

```suggestion
            'Congratulations on completing the Certified Full Stack Developer Curriculum!',
```

Code after:
          isPythonCertV9: true,
          isQaCertV7: true,
          isRelationalDatabaseCertV8: true,
          isRelationalDatabaseCertV9: true,
          isRespWebDesignCert: true,
          isRespWebDesignCertV9: true,
          isSciCompPyCertV7: true
        }
      });

      const email = updatedUser.email;
      const updatedUserSansNull = removeNulls(updatedUser);
      const updatedIsCertMap = getUserIsCertMap(updatedUserSansNull);

      // TODO(POST-MVP): Consider sending email based on `user.isEmailVerified` as well
      const fullStackV9Claimed = updatedIsCertMap.isFullStackDeveloperCertV9;

      const shouldSendCertifiedEmailToCamper =
        email && validator.default.isEmail(email) && fullStackV9Claimed;

      if (shouldSendCertifiedEmailToCamper) {
        const notifyUser = {
          to: email,
          from: 'quincy@freecodecamp.org',
          subject:
            'Congratulations on completing the Certified Full Stack Developer Curriculum!',
          text: renderCertifiedEmail({
            username: updatedUser.username,
            // Safety: `user.name` is required to exist earlier. TODO: Assert
            name: updatedUser.name as string
          })
        };

        // Failed email should not prevent successful response.
        try {
          logger.info(`Sending congratulations email to ${user.id}`);
          // TODO(POST-MVP): Ensure Camper knows they **have** claimed the cert, but the email failed to send.
          await fastify.sendEmail(notifyUser);
        } catch (e) {
          logger.error(e);
          fastify.Sentry.captureException(e);
        }
      }

      logger.info(`${user.id} has claimed ${certName}`);
      void reply.code(200);
      return {
        response: {
          type: 'success',
          message: 'flash.cert-claim-success',
          variables: {