Skip to content
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

feat(api): Add workspace removal notification email template #476

Merged
Changes from 1 commit
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
0a1f923
feat: add project removal notification email template
Allan2000-Git Oct 4, 2024
e27d394
fix: rename project to workspace and minor ui changes
Allan2000-Git Oct 6, 2024
2fff238
feat: create template using react-email
Allan2000-Git Oct 8, 2024
b1ff06a
feat: add project removal notification email template
Allan2000-Git Oct 4, 2024
f71846e
fix: rename project to workspace and minor ui changes
Allan2000-Git Oct 6, 2024
05cfe56
feat: create template using react-email
Allan2000-Git Oct 8, 2024
66344be
Merge branch 'feat/project-removal-email-template' of https://github.…
Allan2000-Git Oct 13, 2024
257d69b
feat: use react email to create workspace removal email template
Allan2000-Git Oct 13, 2024
ae040dc
Merge branch 'develop' into feat/project-removal-email-template
Allan2000-Git Oct 13, 2024
316f7d6
fix: fix merge conflicts
Allan2000-Git Oct 13, 2024
140a5c5
fix: fix module not found error in test file
Allan2000-Git Oct 13, 2024
87cbf59
fix: revert the changes by removing extension
Allan2000-Git Oct 13, 2024
7b50ef2
nit: rename subject and email template name
Allan2000-Git Oct 14, 2024
155b648
Merge branch 'develop' into feat/project-removal-email-template
Allan2000-Git Oct 16, 2024
7871eca
nit: rename method name from workspaceRemoval to removedFromWorkspace
Allan2000-Git Oct 16, 2024
300e955
Merge branch 'feat/project-removal-email-template' of https://github.…
Allan2000-Git Oct 16, 2024
1955078
Merge branch 'develop' into feat/project-removal-email-template
rajdip-b Oct 17, 2024
d4b11bc
chore: branch update
Allan2000-Git Nov 18, 2024
5b42e4f
fix: rename tsx to ts extension
Allan2000-Git Nov 18, 2024
7b04d40
chore: add tsx to moduleFileExtensions in jest config file
Allan2000-Git Nov 18, 2024
f736123
chore: add tsx to moduleFileExtensions in jest-e2e config file
Allan2000-Git Nov 18, 2024
e948b56
chore: update regex to support tsx in jest & jest-e2e config file
Allan2000-Git Nov 18, 2024
b37cee3
chore: installed react types
Allan2000-Git Nov 19, 2024
1d1802e
chore: updated pnpm lock file
Allan2000-Git Nov 19, 2024
8d48510
fix: remove mail.service.tsx file (renamed to .ts)
Allan2000-Git Nov 19, 2024
4bf5f94
Merge branch 'develop' into feat/project-removal-email-template
rajdip-b Nov 27, 2024
055755c
chore: updated pnpm lock file
Allan2000-Git Nov 27, 2024
7d9585d
feat(api): implement send email upon removal from wrokspace and chang…
muntaxir4 Nov 27, 2024
b832359
fix: fixed formatting of date in the email template using dayjs
Allan2000-Git Dec 1, 2024
ba690ae
chore: updated package.json file for api
Allan2000-Git Dec 1, 2024
0fec7c7
fix: fixed prettier problem of async keyword by moving comment inside…
Allan2000-Git Dec 1, 2024
1d535ce
fix: integrate localized date formatting with dayjs
Allan2000-Git Dec 1, 2024
5acf18e
feat: used custom dayjs format
Allan2000-Git Dec 1, 2024
517affa
Merge branch 'develop' into feat/project-removal-email-template
Allan2000-Git Dec 1, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 15 additions & 14 deletions apps/api/src/socket/change-notifier.socket.ts
rajdip-b marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -94,25 +94,26 @@ export default class ChangeNotifier
)
@UseGuards(AuthGuard, ApiKeyGuard)
@SubscribeMessage('register-client-app')
/**
* This event is emitted from the CLI to register
* itself with our services so that it can receive live updates.
*
* The CLI will send a `ChangeNotifierRegistration` object
* as the message body, containing the workspace slug, project slug,
* and environment slug that the client app wants to receive updates for.
*
* We will then check if the user has access to the workspace,
* project, and environment, and if so, add the client to the
* list of connected clients for that environment.
*
* Finally, we will send an ACK to the client with a status code of 200.
*/
async handleRegister(
@ConnectedSocket() client: Socket,
@MessageBody() data: ChangeNotifierRegistration,
@CurrentUser() user: User
) {
/**
* This event is emitted from the CLI to register
* itself with our services so that it can receive live updates.
*
* The CLI will send a `ChangeNotifierRegistration` object
* as the message body, containing the workspace slug, project slug,
* and environment slug that the client app wants to receive updates for.
*
* We will then check if the user has access to the workspace,
* project, and environment, and if so, add the client to the
* list of connected clients for that environment.
*
* Finally, we will send an ACK to the client with a status code of 200.
*/

try {
// Check if the user has access to the workspace
await this.authorityCheckerService.checkAuthorityOverWorkspace({
Expand Down
Loading