def post(self): json_data = request.get_json(force=True) data = utils.val_request(model=Components, json_data=json_data, att={'component_id': json_data['component_id']}) if data[1] == 200: utils.write_to_db(Components, json_data) return output_json(data[0], data[1], d_type_header)
def post(self): json_data = request.get_json(force=True) data = utils.val_request(model=Categories, json_data=json_data, att={'data_category_id': json_data['data_category_id']}) if data[1] == 200: utils.write_to_db(Categories, json_data) return output_json(data[0], data[1], d_type_header)
def post(self): json_data = request.get_json(force=True) data = utils.val_request(model=PartNumbers, json_data=json_data, att={'part_number_id': json_data['part_number_id']}) if data[1] == 200: utils.write_to_db(PartNumbers, json_data) return output_json(data[0], data[1], d_type_header)