示例#1
0
文件: api.py 项目: CYJ/malcom
def neighbors():
	query = {}
	for key in request.args:
		query[key] = request.args.getlist(key)

	data = Model.find_neighbors(query, include_original=True)
	return (dumps(data), 200, {'Content-Type': 'application/json'})
示例#2
0
文件: api.py 项目: darron/malcom
def neighbors():
    query = {}
    for key in request.args:
        query[key] = request.args.getlist(key)

    data = Model.find_neighbors(query, include_original=True)
    return (dumps(data), 200, {'Content-Type': 'application/json'})
示例#3
0
文件: api.py 项目: Mayur021/malcom
    def get(self):
        query = {}
        for key in request.args:
            if key == '_id':
                query[key] = {"$in" : [ObjectId(id) for id in request.args.getlist(key)]}
            else:
                query[key] = {"$in" : request.args.getlist(key)}

        data = Model.find_neighbors(query, include_original=True)
        return data
示例#4
0
文件: api.py 项目: kernux/malcom
def neighbors():
	query = {}
	for key in request.args:
		if key == '_id':
			query[key] = {"$in" : [ObjectId(id) for id in request.args.getlist(key)]}
		else:
			query[key] = {"$in" : request.args.getlist(key)}

	data = Model.find_neighbors(query, include_original=True)
	return (dumps(data), 200, {'Content-Type': 'application/json'})
示例#5
0
文件: api.py 项目: valour01/malcom
    def get(self):
        query = {}
        for key in request.args:
            if key == '_id':
                query[key] = {
                    "$in": [ObjectId(id) for id in request.args.getlist(key)]
                }
            else:
                query[key] = {"$in": request.args.getlist(key)}

        data = Model.find_neighbors(query, include_original=True)
        return data
示例#6
0
def neighbors():
    query = {}
    for key in request.args:
        if key == '_id':
            query[key] = {
                "$in": [ObjectId(id) for id in request.args.getlist(key)]
            }
        else:
            query[key] = {"$in": request.args.getlist(key)}

    data = Model.find_neighbors(query, include_original=True)
    return (dumps(data), 200, {'Content-Type': 'application/json'})