Step 3: Add admin API endpoints for pricing configuration
- Add PricingConfigResponse and PricingConfigUpdate schemas - Create PricingService with validation logic - Add GET and PUT endpoints in routes/pricing.py - Add MANAGE_PRICING permission to admin role - Register pricing router in main.py - Add comprehensive API tests for permissions and validation
This commit is contained in:
parent
74b934135a
commit
4d0dad8e2b
8 changed files with 534 additions and 0 deletions
|
|
@ -22,6 +22,7 @@ class Permission(str, PyEnum):
|
|||
|
||||
# Availability/Exchange permissions (admin)
|
||||
MANAGE_AVAILABILITY = "manage_availability"
|
||||
MANAGE_PRICING = "manage_pricing"
|
||||
VIEW_ALL_EXCHANGES = "view_all_exchanges"
|
||||
CANCEL_ANY_EXCHANGE = "cancel_any_exchange"
|
||||
COMPLETE_EXCHANGE = "complete_exchange"
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ ROLE_DEFINITIONS: dict[str, RoleConfig] = {
|
|||
Permission.FETCH_PRICE,
|
||||
Permission.MANAGE_INVITES,
|
||||
Permission.MANAGE_AVAILABILITY,
|
||||
Permission.MANAGE_PRICING,
|
||||
Permission.VIEW_ALL_EXCHANGES,
|
||||
Permission.CANCEL_ANY_EXCHANGE,
|
||||
Permission.COMPLETE_EXCHANGE,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue