Skip to content

fix: handle undefine appId#1818

Merged
prafull-opensignlabs merged 1 commit intostagingfrom
updates-15966812948
Jun 30, 2025
Merged

fix: handle undefine appId#1818
prafull-opensignlabs merged 1 commit intostagingfrom
updates-15966812948

Conversation

@nxglabs
Copy link
Collaborator

@nxglabs nxglabs commented Jun 30, 2025

fix: handle undefine appId

Copilot AI review requested due to automatic review settings June 30, 2025 07:37
@vercel
Copy link

vercel bot commented Jun 30, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
open-sign ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 30, 2025 7:38am

@prafull-opensignlabs prafull-opensignlabs changed the title Merge pull request #917 from nxglabs/handle_appid fix: handle undefine appId Jun 30, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Centralize the application ID retrieval by exporting serverAppId and replace direct process.env.APP_ID references across backend and cloud functions; also refine signature logic in the front-end modal.

  • Export serverAppId in Utils.js with a fallback default.
  • Update all cloud functions and server entrypoint to use serverAppId instead of process.env.APP_ID.
  • Adjust trimming and fallback logic in WidgetsValueModal.jsx for signature generation.

Reviewed Changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated no comments.

Show a summary per file
File Description
apps/OpenSignServer/index.js Replaced process.env.APP_ID with serverAppId in imports and config
apps/OpenSignServer/cloud/parsefunction/usersignup.js Switched APPID to use serverAppId import
apps/OpenSignServer/cloud/parsefunction/pdf/PDF.js Added serverAppId import and replaced env usage
apps/OpenSignServer/cloud/parsefunction/getReport.js Imported serverAppId and updated appId assignment
apps/OpenSignServer/cloud/parsefunction/getDrive.js Imported serverAppId and updated appId assignment
apps/OpenSignServer/cloud/parsefunction/getDocument.js Imported serverAppId and updated header usage
apps/OpenSignServer/cloud/parsefunction/createBatchDocs.js Imported serverAppId and updated appId assignment
apps/OpenSignServer/cloud/parsefunction/createBatchContact.js Imported serverAppId and replaced env usage
apps/OpenSignServer/cloud/parsefunction/GetTemplate.js Imported serverAppId and updated header usage
apps/OpenSignServer/cloud/parsefunction/ForwardDoc.js Imported serverAppId and updated header usage
apps/OpenSignServer/cloud/parsefunction/AuthLoginAsMail.js Imported serverAppId and replaced env usage
apps/OpenSignServer/cloud/parsefunction/AddAdmin.js Imported serverAppId and replaced env usage
apps/OpenSignServer/cloud/customRoute/uploadFile.js Imported serverAppId and updated parseAppId assignment
apps/OpenSignServer/cloud/customRoute/docxtopdf.js Imported serverAppId and updated appId assignment
apps/OpenSignServer/Utils.js Exported serverAppId with fallback
apps/OpenSign/src/components/pdf/WidgetsValueModal.jsx Enhanced trimming and fallback logic for signature rendering
Comments suppressed due to low confidence (3)

apps/OpenSignServer/cloud/parsefunction/usersignup.js:4

  • [nitpick] The constant APPID uses uppercase, while other modules use appId or appId variables; consider standardizing to camelCase (appId) for consistency across the codebase.
const APPID = serverAppId;

apps/OpenSign/src/components/pdf/WidgetsValueModal.jsx:702

  • fullUserName is not trimmed and may include leading/trailing whitespace; consider using trimmedName as the fallback value to ensure consistency.
        const fullUserName = typedSignature || currentUserName

apps/OpenSignServer/cloud/parsefunction/usersignup.js:5

  • process.env.MASTER_KEY is repeatedly accessed in multiple modules; consider exporting it (e.g., serverMasterKey) from Utils.js to centralize environment variable management.
const masterKEY = process.env.MASTER_KEY;

@prafull-opensignlabs prafull-opensignlabs merged commit 4a5b35e into staging Jun 30, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants