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

Create a route to save notification in backend #106

Open
dvishal485 opened this issue Aug 26, 2024 · 0 comments
Open

Create a route to save notification in backend #106

dvishal485 opened this issue Aug 26, 2024 · 0 comments

Comments

@dvishal485
Copy link
Member

Frontend will send notification in body with type ClientNotification, wrap it in INotification type (by adding extra time field populated with current time), save it in the database. (schema already exists in backend code)

https://github.com/dtutimes/nix-backend-v2/blob/main/src/api/models/notificationModel.ts#L34-L44

https://github.com/dtutimes/nix-backend-v2/blob/main/src/api/models/notificationModel.ts#L54-L62

export interface ClientNotification {
  title: string;
  description: string;
  actions: ClientNotificationAction[];
  link?: string;
}

export interface ClientNotificationAction {
  action: string;
  link: string;
}
@dtutimes dtutimes deleted a comment Aug 26, 2024
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

No branches or pull requests

1 participant