Commit graph

18 commits

Author SHA1 Message Date
Martin Velebil
cfa0da8082 Merge branch 'main' into 250811_ProductCompanyTable
# Conflicts:
#	DrinkRateAPI/Controllers/UserProfileController.cs
2025-08-12 06:52:40 +02:00
Jiří Vrabec
602496ec08 Add user profile endpoints 2025-08-11 22:08:13 +02:00
87a2250852 Handle unique constraint violation on ProductCompanyTableCouple create 2025-08-11 21:24:28 +02:00
e7b737a3dd Add error messages 2025-08-11 21:23:49 +02:00
69573991ca Add CompanyTableId to ProductTableGet 2025-08-11 21:22:37 +02:00
126e2a8c73 Merge remote-tracking branch 'origin/250809_UserProfile' into 250811_ProductCompanyTable 2025-08-11 21:14:11 +02:00
e3a1888146 Update namespace for ProductCompanyTableCouple 2025-08-11 21:04:28 +02:00
b7677bc139 Create product-company table coupling, fix one-to-one relationship
Introduce a new entity to couple product and company tables.
2025-08-11 21:03:28 +02:00
5401d29d44 Add product table management endpoints
Implement API endpoints for creating and retrieving product tables.
This allows administrators to define product tables and retrieve them by name.
The creation endpoint is secured and only accessible to administrators.
2025-08-11 19:47:34 +02:00
Jiří Vrabec
1b54a6d6a6 Merge branch '250809_UserProfile' of git.chillplace.beer:chilldev/drinkrate into 250809_UserProfile 2025-08-11 19:34:53 +02:00
Jiří Vrabec
4216535016 Prevent deleted user authentication 2025-08-11 19:33:55 +02:00
1dc37d3282 Handle not found user profile gracefully
Changes from throwing an exception when a user profile is not found to returning null.

This prevents the application from crashing when a user profile is not found, allowing for more graceful error handling.
2025-08-11 18:46:35 +02:00
Martin Velebil
a246764e44 Movesadmin status update endpoint
Relocates the endpoint for updating user admin status from the dedicated AdminController to the UserProfileController.

This consolidates user profile management under a single controller
and leverages existing authorization policies.
2025-08-10 18:33:36 +02:00
Martin Velebil
3230a5ed0f Merge remote-tracking branch 'origin/250809_UserProfile' into 250810_UserProfileAdmin
# Conflicts:
#	DrinkRateAPI/Services/UserProfileService.cs
2025-08-10 18:18:06 +02:00
Jiří Vrabec
dad144a80f Create user profile service base 2025-08-10 16:35:36 +02:00
b2b8d1e076 Refactor admin endpoint and logic
Moves the ChangeUserAdminStatusRequest to the ApiModels folder.
Updates the admin controller route to "admin" and the admin status
endpoint to "adminStatus".
Makes the ChangeUserAdminStatus method asynchronous.
Uses NotFoundException instead of KeyNotFoundException.
2025-08-10 16:23:35 +02:00
c0860b05d1 Enable admin status management
Adds functionality to allow administrators to modify the admin status of other users.

Introduces an endpoint for changing user admin status, accessible only to existing administrators.
This change includes necessary services and request models to handle the logic.
2025-08-10 13:55:20 +02:00
Jiří Vrabec
76cb56d819 Add user authorization service 2025-08-10 11:20:18 +02:00