feat: add CRM admin API views for managing and auditing products
All checks were successful
Deploy Beta (NATIVE) / deploy (push) Successful in 34s
All checks were successful
Deploy Beta (NATIVE) / deploy (push) Successful in 34s
This commit is contained in:
parent
0261439af1
commit
f000cbe174
1 changed files with 5 additions and 1 deletions
|
|
@ -18,7 +18,11 @@ def log_product_action(admin, action, product_id, details):
|
|||
@api_view(['GET'])
|
||||
@permission_classes([IsCRMAdmin])
|
||||
def list_products(request):
|
||||
products = Product.objects.all()
|
||||
include_deleted = request.query_params.get('include_deleted')
|
||||
if include_deleted == 'true':
|
||||
products = Product.objects.all()
|
||||
else:
|
||||
products = Product.objects.filter(is_active=True)
|
||||
|
||||
product_status = request.query_params.get('status')
|
||||
if product_status:
|
||||
|
|
|
|||
Loading…
Reference in a new issue