fix: handle undefine appId#1818
Merged
prafull-opensignlabs merged 1 commit intostagingfrom Jun 30, 2025
Merged
Conversation
fix: handle undefine appId
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
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
serverAppIdinUtils.jswith a fallback default. - Update all cloud functions and server entrypoint to use
serverAppIdinstead ofprocess.env.APP_ID. - Adjust trimming and fallback logic in
WidgetsValueModal.jsxfor 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
APPIDuses uppercase, while other modules useappIdorappIdvariables; consider standardizing to camelCase (appId) for consistency across the codebase.
const APPID = serverAppId;
apps/OpenSign/src/components/pdf/WidgetsValueModal.jsx:702
fullUserNameis not trimmed and may include leading/trailing whitespace; consider usingtrimmedNameas the fallback value to ensure consistency.
const fullUserName = typedSignature || currentUserName
apps/OpenSignServer/cloud/parsefunction/usersignup.js:5
process.env.MASTER_KEYis repeatedly accessed in multiple modules; consider exporting it (e.g.,serverMasterKey) fromUtils.jsto centralize environment variable management.
const masterKEY = process.env.MASTER_KEY;
prafull-opensignlabs
approved these changes
Jun 30, 2025
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.
fix: handle undefine appId