mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-10-31 05:05:42 +00:00 
			
		
		
		
	Add RUD endpoint for Company
This commit is contained in:
		| @@ -43,7 +43,19 @@ class CompanyList(generics.ListCreateAPIView): | ||||
|     ordering = 'name' | ||||
|  | ||||
|  | ||||
| class CompanyDetail(generics.RetrieveUpdateDestroyAPIView): | ||||
|  | ||||
|     queryset = Company.objects.all() | ||||
|     serializer_class = CompanySerializer | ||||
|      | ||||
|     permission_classes = [ | ||||
|         permissions.IsAuthenticatedOrReadOnly, | ||||
|     ] | ||||
|  | ||||
|  | ||||
| company_api_urls = [ | ||||
|  | ||||
|     url(r'^(?P<pk>\d+)/?', CompanyDetail.as_view(), name='api-company-detail'), | ||||
|  | ||||
|     url(r'^.*$', CompanyList.as_view(), name='api-company-list'), | ||||
| ] | ||||
|   | ||||
		Reference in New Issue
	
	Block a user