-
Notifications
You must be signed in to change notification settings - Fork 149
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
Sale notifications #509
Open
ravirajput10
wants to merge
5
commits into
main
Choose a base branch
from
issue-364
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Sale notifications #509
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
6420046
Sale notification to course admins
ravirajput10 0971e75
Merge branch 'main' into issue-364
8aed917
TS fix and moved a string to the common file
3ae1b11
Lint fixes
4139416
Added currency symbol & format the email template
ravirajput10 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
const saleEmailTemplate = ` | ||
doctype html | ||
html | ||
head | ||
style(type='text/css'). | ||
.email-container { | ||
max-width: 960px; | ||
} | ||
.cta-container { | ||
margin: 32px 0px; | ||
text-align: center; | ||
} | ||
.cta { | ||
border: 1px solid #07077b; | ||
border-radius: 4px; | ||
padding: 4px 8px; | ||
text-decoration: none; | ||
color: white; | ||
background-color: #07077b; | ||
font-weight: bold; | ||
} | ||
.cta:hover { | ||
background-color: #060665; | ||
} | ||
.courselit-branding-container { | ||
margin: 40px 0px; | ||
} | ||
.courselit-branding-cta { | ||
text-decoration: none; | ||
color: #000000; | ||
padding: 6px 10px; | ||
background-color: #FFFFFF; | ||
border: 1px solid; | ||
border-radius: 6px; | ||
text-align: center; | ||
} | ||
.sale-notification-heading { | ||
padding-bottom: 5px; | ||
} | ||
.sale-details { | ||
padding-bottom: 10px; | ||
} | ||
.course-name-and-price { | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
font-weight: bold; | ||
padding-bottom: 20px; | ||
} | ||
body | ||
div(class="email-container") | ||
div(class="sale-notification-heading") | ||
p Yay! You have made a sale! | ||
div(class="sale-details") | ||
p <strong>Order</strong>: #{order} | ||
p <strong>Date</strong>: #{date} | ||
p <strong>Email</strong>: #{email} | ||
div(class="course-name-and-price") | ||
span #{courseName} | ||
span #{coursePrice} | ||
p(class="signature") | ||
| Best, | ||
p #[a(href="https://x.com/courselit") @CourseLit] | ||
if !hideCourseLitBranding | ||
div(class="courselit-branding-container") | ||
a( | ||
href="https://courselit.app" | ||
target="_blank" | ||
class="courselit-branding-cta" | ||
) Powered by <strong>CourseLit</strong> | ||
`; | ||
|
||
export default saleEmailTemplate; |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
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.
Check warning
Code scanning / CodeQL
Log injection Medium
Copilot Autofix AI about 1 month ago
To fix the log injection issue, we need to sanitize the user input before logging it. Specifically, we should remove any newline characters from the
message
parameter to prevent log injection. This can be done using theString.prototype.replace
method to replace newline characters with an empty string.We will apply this sanitization in the
info
,warn
, anderror
functions in theapps/web/services/logger.ts
file to ensure that all log messages are sanitized before being logged.