Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
@@ -158,9 +158,9 @@ username = urllib.parse.quote_plus(os.getenv('MONGO_USERNAME'))
|
|
158 |
password = urllib.parse.quote_plus(os.getenv('MONGO_PASSWORD'))
|
159 |
restUri = os.getenv('REST_URI');
|
160 |
|
161 |
-
uri = f'mongodb+srv://{username}:{password}
|
162 |
|
163 |
-
client = MongoClient(uri
|
164 |
db = client.GenUpNexus
|
165 |
users_collection = db["users"]
|
166 |
interviews_collection = db["interviews"]
|
@@ -656,31 +656,31 @@ def delete_account():
|
|
656 |
return jsonify({"message": "Something went wrong"}), 500
|
657 |
|
658 |
# mindmap routes
|
659 |
-
@app.route('/mindmap/save', methods=['POST'])
|
660 |
-
@auth_user
|
661 |
-
def mindmapSave():
|
662 |
-
|
663 |
-
|
664 |
-
|
665 |
-
|
666 |
-
@app.route('/mindmap/get', methods=['GET'])
|
667 |
-
@auth_user
|
668 |
-
def mindmapGet():
|
669 |
-
|
670 |
-
|
671 |
-
|
672 |
-
@app.route('/mindmap/get/<id>', methods=['GET'])
|
673 |
-
@auth_user
|
674 |
-
def mindmapGetById(id):
|
675 |
-
|
676 |
-
|
677 |
-
|
678 |
-
@app.route('/mindmap/delete', methods=['POST'])
|
679 |
-
@auth_user
|
680 |
-
def mindmapDelete():
|
681 |
-
|
682 |
-
|
683 |
-
|
684 |
|
685 |
|
686 |
@app.route('/mindmap/demo', methods=['POST'])
|
|
|
158 |
password = urllib.parse.quote_plus(os.getenv('MONGO_PASSWORD'))
|
159 |
restUri = os.getenv('REST_URI');
|
160 |
|
161 |
+
uri = f'mongodb+srv://{username}:{password}@cluster0.iidzcbc.mongodb.net/?retryWrites=true&w=majority&appName=Cluster0'
|
162 |
|
163 |
+
client = MongoClient(uri)
|
164 |
db = client.GenUpNexus
|
165 |
users_collection = db["users"]
|
166 |
interviews_collection = db["interviews"]
|
|
|
656 |
return jsonify({"message": "Something went wrong"}), 500
|
657 |
|
658 |
# mindmap routes
|
659 |
+
# @app.route('/mindmap/save', methods=['POST'])
|
660 |
+
# @auth_user
|
661 |
+
# def mindmapSave():
|
662 |
+
# userId = request.userId
|
663 |
+
# data = request.json
|
664 |
+
# return saveMindmap(data, userId, savedMindmap)
|
665 |
+
|
666 |
+
# @app.route('/mindmap/get', methods=['GET'])
|
667 |
+
# @auth_user
|
668 |
+
# def mindmapGet():
|
669 |
+
# userId = request.userId
|
670 |
+
# return getMindmap(userId, savedMindmap)
|
671 |
+
|
672 |
+
# @app.route('/mindmap/get/<id>', methods=['GET'])
|
673 |
+
# @auth_user
|
674 |
+
# def mindmapGetById(id):
|
675 |
+
# userId = request.userId
|
676 |
+
# return getMindmapByid(userId, id, savedMindmap)
|
677 |
+
|
678 |
+
# @app.route('/mindmap/delete', methods=['POST'])
|
679 |
+
# @auth_user
|
680 |
+
# def mindmapDelete():
|
681 |
+
# userId = request.userId
|
682 |
+
# data = request.json
|
683 |
+
# return deleteMindmap(userId, data, savedMindmap)
|
684 |
|
685 |
|
686 |
@app.route('/mindmap/demo', methods=['POST'])
|