mirror of
				https://github.com/veops/cmdb.git
				synced 2025-11-04 13:46:17 +08:00 
			
		
		
		
	fix(api): common_data delele (#282)
This commit is contained in:
		@@ -24,12 +24,12 @@ class DataView(APIView):
 | 
			
		||||
class DataViewWithId(APIView):
 | 
			
		||||
    url_prefix = (f'{prefix}/<string:data_type>/<int:_id>',)
 | 
			
		||||
 | 
			
		||||
    def put(self, _id):
 | 
			
		||||
    def put(self, data_type, _id):
 | 
			
		||||
        params = request.json
 | 
			
		||||
        res = CommonDataCRUD.update_data(_id, **params)
 | 
			
		||||
 | 
			
		||||
        return self.jsonify(res.to_dict())
 | 
			
		||||
 | 
			
		||||
    def delete(self, _id):
 | 
			
		||||
    def delete(self, data_type, _id):
 | 
			
		||||
        CommonDataCRUD.delete(_id)
 | 
			
		||||
        return self.jsonify({})
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user