diff --git a/InvenTree/InvenTree/urls.py b/InvenTree/InvenTree/urls.py index c6bdf9dfcc..3033529483 100644 --- a/InvenTree/InvenTree/urls.py +++ b/InvenTree/InvenTree/urls.py @@ -20,7 +20,7 @@ from build.urls import build_urls from order.urls import order_urls from barcodes.api import barcode_api_urls -from common.api import common_api_urls +from common.api import common_api_urls, settings_api_urls from part.api import part_api_urls, bom_api_urls from company.api import company_api_urls from stock.api import stock_api_urls @@ -52,7 +52,7 @@ admin.site.site_header = "InvenTree Admin" apipatterns = [ url(r'^barcode/', include(barcode_api_urls)), - url(r'^settings/', include(common_api_urls)), + url(r'^settings/', include(settings_api_urls)), url(r'^part/', include(part_api_urls)), url(r'^bom/', include(bom_api_urls)), url(r'^company/', include(company_api_urls)), @@ -68,6 +68,9 @@ apipatterns = [ # Plugin endpoints url(r'^action/', ActionPluginView.as_view(), name='api-action-plugin'), + # common endpoints + url(r'', include(common_api_urls)), + # InvenTree information endpoint url(r'^$', InfoView.as_view(), name='api-inventree-info'), diff --git a/InvenTree/common/api.py b/InvenTree/common/api.py index df9cb6161c..9d2ab49f41 100644 --- a/InvenTree/common/api.py +++ b/InvenTree/common/api.py @@ -144,6 +144,7 @@ class NotificationList(generics.ListAPIView): #'age', # TODO enable ordering by age 'category', 'name', + 'read', ] search_fields = [ @@ -181,8 +182,7 @@ class NotificationDetail(generics.RetrieveDestroyAPIView): ] -common_api_urls = [ - +settings_api_urls = [ # User settings url(r'^user/', include([ # User Settings Detail @@ -200,6 +200,9 @@ common_api_urls = [ # Global Settings List url(r'^.*$', GlobalSettingsList.as_view(), name='api-global-setting-list'), ])), +] + +common_api_urls = [ # Notifications url(r'^notifications/', include([