def patch(self, _id): schema = AddressSchema(partial=True) attributes, errors = schema.load(request.json) if errors: return errors, 422 return dbutils.update(Address, **attributes)
def patch(self, user_id): schema = UserSchema(partial=True) attributes, errors = schema.load(request.json) if errors: return errors, 422 return dbutils.update(User, **attributes)
def delete(self, _id): return dbutils.update(Address, active=False)
def delete(self, _id): return dbutils.update(Profile, active=False)
def delete(self, _id): return dbutils.update(Company, active=False)
def delete(self, user_id): return dbutils.update(User, active=False)