-
Notifications
You must be signed in to change notification settings - Fork 0
Ability to add user info when logging (overrides or adds info if there isn't any) #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds the ability to override user information when logging by allowing callers to provide custom user details that take precedence over the default launch info values.
- Adds an optional
overriddenUserInfoparameter to the logging endpoint with userId, userFirstName, and userLastName fields - Updates the logging logic to use provided override values when available, falling back to launch info defaults
- Updates package version and dependency to a stable release
Reviewed Changes
Copilot reviewed 5 out of 9 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/helpers/initServer.ts | Adds overriddenUserInfo parameter to logging endpoint and passes user override fields to log creation |
| src/helpers/genRouteHandler.ts | Implements logic to use override user info when provided, falling back to launch info defaults |
| package.json | Bumps version to 4.2.1 and updates dce-reactkit dependency to stable 4.1.8 |
| lib/helpers/initServer.js | Compiled JavaScript output for initServer changes |
| lib/helpers/genRouteHandler.js | Compiled JavaScript output for genRouteHandler changes |
| * @param {number} [opts.userId] overriding Canvas id of the user performing the action | ||
| * @param {string} [opts.userFirstName] overriding first name of the user performing the action | ||
| * @param {string} [opts.userLastName] overriding last name of the user performing the action |
Copilot
AI
Aug 7, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The parameter documentation refers to 'opts.userId' but the actual parameter is 'overriddenUserInfo.userId'. The documentation should be corrected to match the parameter structure.
| * @param {number} [opts.userId] overriding Canvas id of the user performing the action | |
| * @param {string} [opts.userFirstName] overriding first name of the user performing the action | |
| * @param {string} [opts.userLastName] overriding last name of the user performing the action | |
| * @param {number} [overriddenUserInfo.userId] overriding Canvas id of the user performing the action | |
| * @param {string} [overriddenUserInfo.userFirstName] overriding first name of the user performing the action | |
| * @param {string} [overriddenUserInfo.userLastName] overriding last name of the user performing the action |
| * @param {number} [opts.userId] overriding Canvas id of the user performing the action | ||
| * @param {string} [opts.userFirstName] overriding first name of the user performing the action | ||
| * @param {string} [opts.userLastName] overriding last name of the user performing the action |
Copilot
AI
Aug 7, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The parameter documentation refers to 'opts.userFirstName' but the actual parameter is 'overriddenUserInfo.userFirstName'. The documentation should be corrected to match the parameter structure.
| * @param {number} [opts.userId] overriding Canvas id of the user performing the action | |
| * @param {string} [opts.userFirstName] overriding first name of the user performing the action | |
| * @param {string} [opts.userLastName] overriding last name of the user performing the action | |
| * @param {number} [overriddenUserInfo.userId] overriding Canvas id of the user performing the action | |
| * @param {string} [overriddenUserInfo.userFirstName] overriding first name of the user performing the action | |
| * @param {string} [overriddenUserInfo.userLastName] overriding last name of the user performing the action |
| * @param {number} [opts.userId] overriding Canvas id of the user performing the action | ||
| * @param {string} [opts.userFirstName] overriding first name of the user performing the action | ||
| * @param {string} [opts.userLastName] overriding last name of the user performing the action |
Copilot
AI
Aug 7, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The parameter documentation refers to 'opts.userLastName' but the actual parameter is 'overriddenUserInfo.userLastName'. The documentation should be corrected to match the parameter structure.
| * @param {number} [opts.userId] overriding Canvas id of the user performing the action | |
| * @param {string} [opts.userFirstName] overriding first name of the user performing the action | |
| * @param {string} [opts.userLastName] overriding last name of the user performing the action | |
| * @param {number} [overriddenUserInfo.userId] overriding Canvas id of the user performing the action | |
| * @param {string} [overriddenUserInfo.userFirstName] overriding first name of the user performing the action | |
| * @param {string} [overriddenUserInfo.userLastName] overriding last name of the user performing the action |
|
@gabeabrams will this allow a log from the server side without the request object? |
No description provided.