mirror of https://github.com/veops/cmdb.git
fix(api): common_data delele (#282)
This commit is contained in:
parent
d525e1ec54
commit
edde467c87
|
@ -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({})
|
||||
|
|
Loading…
Reference in New Issue