예제 #1
0
    def patch(self, _id):
        schema = AddressSchema(partial=True)
        attributes, errors = schema.load(request.json)
        if errors:
            return errors, 422

        return dbutils.update(Address, **attributes)
예제 #2
0
    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)
예제 #3
0
 def delete(self, _id):
     return dbutils.update(Address, active=False)
예제 #4
0
 def delete(self, _id):
     return dbutils.update(Profile, active=False)
예제 #5
0
 def delete(self, _id):
     return dbutils.update(Company, active=False)
예제 #6
0
 def delete(self, user_id):
     return dbutils.update(User, active=False)