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/mobile/notifications #214

Merged
merged 15 commits into from
Jul 17, 2024
Merged

Feat/mobile/notifications #214

merged 15 commits into from
Jul 17, 2024

Conversation

waveyboym
Copy link
Member

@waveyboym waveyboym commented Jul 17, 2024

Description

This pr introduces some notification logic for the backend

Fixes # (issue)

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Tested with postman to ensure the code functions as expected
  • Wrote some unit tests as well

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

KamogeloMoeketse and others added 14 commits July 15, 2024 00:14
The User struct in database.go has been updated to include a new field called ExpoPushToken. This field will store the Expo push token for a user, allowing for push notifications to be sent to specific users. This change was made to support the new functionality of retrieving push tokens for specific users.
…otifications. Now we need to integrate with frontend. Additional new endpoints are get-notifications for users as well as get-users. They also allow for filtering functionality.

Lastly, some code has been refactored to make it cleaner and easier to manage on the backend
…ironments

The docker-compose.dev.yml and docker-compose.prod.yml files have been updated to include new services for MongoDB and RabbitMQ. These services are necessary for the backend to function properly. Additionally, volumes have been added to persist data for MongoDB and RabbitMQ. This update improves the development and production environments by providing the required dependencies.
…endpoints

The code changes introduce the ability to filter results in the get-notifications and get-users endpoints. This allows users to retrieve specific notifications and users based on certain criteria. The changes include adding new fields to the QueryInput struct and updating the FilterCollectionWithProjection function to handle the filtering logic. This enhancement improves the flexibility and usability of the backend API.
The code changes introduce a new package called "reciever" for consuming messages. This package is used in the main.go file to start consuming messages from RabbitMQ. By separating the consuming logic into its own package, the code becomes more modular and easier to maintain. This enhancement improves the overall architecture of the backend application.
The docker-compose.dev.yml and docker-compose.prod.yml files have been updated to include new services for MongoDB and RabbitMQ. These services are necessary for the backend to function properly. Additionally, volumes have been added to persist data for MongoDB and RabbitMQ. This update improves the development and production environments by providing the required dependencies.
@waveyboym waveyboym added type: documentation Improvements or additions to documentation type: feature A new feature type: fix Introduces a fix for a previous issue type: security This is a security related issue/pr type: testing This affects one or more tests For: api This is mainly for the api For: backend This is mainly for the backend code priority: medium This does/did not need to be addressed soon but should have plans in place to be addressed labels Jul 17, 2024
@waveyboym waveyboym self-assigned this Jul 17, 2024
@waveyboym waveyboym added this to the Week 3 Sprint 3 milestone Jul 17, 2024
Copy link

codecov bot commented Jul 17, 2024

Codecov Report

Attention: Patch coverage is 65.47619% with 58 lines in your changes missing coverage. Please review.

Project coverage is 68.99%. Comparing base (3fc5dcb) to head (840b93a).
Report is 5 commits behind head on develop.

Files Patch % Lines
occupi-backend/pkg/database/database.go 32.43% 47 Missing and 3 partials ⚠️
occupi-backend/pkg/utils/utils.go 91.48% 7 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #214      +/-   ##
===========================================
- Coverage    71.55%   68.99%   -2.56%     
===========================================
  Files            8        8              
  Lines         1174     1329     +155     
===========================================
+ Hits           840      917      +77     
- Misses         297      374      +77     
- Partials        37       38       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@waveyboym waveyboym merged commit bb502d0 into develop Jul 17, 2024
5 of 8 checks passed
@waveyboym waveyboym deleted the feat/mobile/notifications branch July 17, 2024 12:11
waveyboym added a commit that referenced this pull request Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
For: api This is mainly for the api For: backend This is mainly for the backend code priority: medium This does/did not need to be addressed soon but should have plans in place to be addressed type: documentation Improvements or additions to documentation type: feature A new feature type: fix Introduces a fix for a previous issue type: security This is a security related issue/pr type: testing This affects one or more tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants