def post(self, id): #by contract, assign the user with vote id on client side #id is movie id count = dbfn.queryDB('select votes from poll where movie_id = ' + str(id)) dbfn.commitDB('update poll set id = ' + str() + 'where movie_id = ' + str(id)) return {"message": "updated count"}
def get(self): return dbfn.queryDB('select * from users where email = \''+api.payload['email']+'\'')
def get(self): '''List all users attending''' tuples = dbfn.queryDB('select first_name, last_name from users where attending = true') print(tuples) return tuples
def get(self, id): '''Fetch a user given its identifier''' return dbfn.queryDB('select * from users where user_id = ' + id), 200
def get(self): '''List all users''' tuples = dbfn.queryDB('select * from users') return tuples
def get(self): '''List all options''' return dbfn.queryDB('select votes from poll')
def get(self, id): '''Fetch a movie given its identifier''' return dbfn.queryDB('select * from poll where movie_id = ' + str(id))
def get(self): '''Fetch a movie given required to show ''' return dbfn.queryDB('select * from poll where to_show = True')