Exemplo n.º 1
0
def list_thread():
	con = dbConnector.connect()

	params = helpers.json_from_get(request)

	optional = helpers.get_optional_params(request=params, values=["since", "limit", "order"])

	try:
		response = thread.list(con=con, required=params, optional=optional, related=[])
	except Exception as e:
		con.close()
		return json.dumps({
			"code": 1,
			"response": (e.message)})

	con.close()
	return json.dumps({
		"code": 0,
		"response": response})

	return