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/backend/create user #359

Closed
wants to merge 25 commits into from
Closed

Feat/backend/create user #359

wants to merge 25 commits into from

Conversation

waveyboym
Copy link
Member

Description

Bringing changes downstream

Fixes # (issue)

Type of change

Please delete options that are not relevant.
N/A

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
N/A

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

This commit updates the user model in database_test.go and adds new request structs: UserRequest, DetailsRequest, NotificationRequest, and RequestIP. The changes include adding new fields and binding validations to the structs.

Refactor the user model and add new request structs
This commit adds new API endpoints for creating users, fetching IP information, adding IPs, and removing IPs. The `CreateUser` function handles the creation of a user in the database, while `GetIPInfo`, `AddIP`, and `RemoveIP` functions handle fetching IP information, adding IPs, and removing IPs respectively.
This commit adds new endpoints for creating users and managing IP addresses. The `CreateUser` function is responsible for creating a new user in the database, while the `AddIP` and `RemoveIP` functions handle adding and removing IP addresses for a user respectively. These changes enhance the functionality of the application by providing the ability to manage user accounts and their associated IP addresses.
@waveyboym waveyboym added the type: bringing changes downstream Just bringing changes downstream label Sep 14, 2024
@waveyboym waveyboym self-assigned this Sep 14, 2024
@waveyboym waveyboym linked an issue Sep 14, 2024 that may be closed by this pull request
1 task
@waveyboym waveyboym closed this Sep 14, 2024
Copy link

codecov bot commented Sep 14, 2024

Codecov Report

Attention: Patch coverage is 9.23077% with 177 lines in your changes missing coverage. Please review.

Project coverage is 88.81%. Comparing base (b43d613) to head (c5fde23).

Files with missing lines Patch % Lines
occupi-backend/pkg/database/database.go 0.00% 138 Missing ⚠️
occupi-backend/pkg/database/database_helpers.go 34.61% 34 Missing ⚠️
occupi-backend/pkg/utils/utils.go 0.00% 5 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##           develop     #359       +/-   ##
============================================
+ Coverage    69.01%   88.81%   +19.80%     
============================================
  Files           54       11       -43     
  Lines         5712     3192     -2520     
  Branches        84        0       -84     
============================================
- Hits          3942     2835     -1107     
+ Misses        1717      313     -1404     
+ Partials        53       44        -9     

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bringing changes downstream Just bringing changes downstream
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[TASK] Create user(basic, admin) endpoint for admins
1 participant