# coding: utf-8

from leancloud import Engine

from app import app


engine = Engine(app)


@engine.define
def hello(**params):
    if 'name' in params:
        return u'Hello, {}!'.format(params['name'])
    else:
        return 'Hello, LeanCloud!'


@engine.define
def editobj(**params):
    from leancloud import Object
    TestObject = Object.extend('TestObject')
    from leancloud import Query
    query = Query(TestObject)
    testObject = query.get('557fcfb7e4b0d02dc2e19e50')
    testObject.set('foo', 'edit')
    testObject.save()


@@ -459,12 +459,12 @@
 557f
-cfb7
+d90e
 e4b0
@@ -474,13 +474,13 @@
 dc2e
-19e50
+3e342
 ')%0A 

edit2