uncomment commit

parent 344b12da
......@@ -140,19 +140,3 @@ def get_earn_val(id):
print("**********")
print(Ex)
# @app.route("/getUsers", methods=["GET"])
# def get_some_users():
# try:
# data = list(db.users.find())
# for user in data:
# user["_id"] = str(user["_id"])
# return Response(
# response= json.dumps(data),
# status=200,
# )
# except Exception as Ex:
# print("**********")
# print(Ex)
......@@ -55,80 +55,3 @@ def get_point_redis():
)
# for user in user_earns:
# # user["_id"] = str(user["_id"])
# user["_id"] = str(user["userID"])
# earnsbyUsr = user["earns"]
# redisClient.zadd(earn_gain, {user["_id"]: earnsbyUsr})
# # print(earnsbyUsr)
# # print(user["_id"])
# print("Contents of the Redis sorted set with scores:")
# response = redisClient.zrange(earn_gain, 0, -1, desc=True, withscores=True)
# print(response)
# my_json = strn.decode('ascii')
# print(my_json)
# stringOBJ = convertTuple(response)
# print(stringOBJ)
# data = json.loads(my_json)
# function covertObjectToBinary(obj) {
# let output = '',
# input = JSON.stringify(obj) // convert the json to string.
# // loop over the string and convert each charater to binary string.
# for (i = 0; i < input.length; i++) {
# output += input[i].charCodeAt(0).toString(2) + " ";
# }
# return output.trimEnd();
# }
# def()
# for obj in response:
# bObject = user["_id"]
# my_json = bObject.decode('utf8')
# print(my_json)
# data = json.loads(my_json)
# print(json.dumps(data))
# return Response(
# response= json.dumps({"message": json.loads(dumps(response))}),
# status=200,
# )
# @app.route("/users", methods=["POST"])
# def create_user():
# try:
# user = {"name": request.form["name"],
# "email": request.form["email"],
# "password": request.form["password"],
# "district": request.form["district"]}
# dbResponse = db.users.insert_one(user)
# print(dbResponse.inserted_id)
# return Response(
# response= json.dumps({"message": "user created",
# "id": f"{dbResponse.inserted_id}"}),
# status=200,
# )
# except Exception as Ex:
# print("**********")
# print(Ex)
# return Response(
# response= json.dumps({"message": "cannot read user"}),
# status=500,
# )
......@@ -73,22 +73,7 @@ def create_user():
)
# user = request.json
# print(user)
# dbResponse = db.users.insert_one(user)
# print(dbResponse)
# return Response(response= json.dumps({"message": "user created",
# "id": f"{dbResponse.inserted_id}"}),
# status=200,)
# print(request.json)
# print(request.data)
# print("hello")
# print(request.form)
# return Response(status=200)
except Exception as Ex:
print("**********")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment