
* 겪고 있는 문제 상황을 최대한 자세하게 작성해주세요.
* 문제 해결을 위해 어떤 시도를 해보았는지 구체적으로 함께 알려주세요.
18라인의 bucket_give 코드가 문제가 있는 것으로 보이는데
어떤 에러인지 오타인것으로는 확인이 안됩니다 답변 부탁드립니다. ㅠㅠ app.py 코드올립니다

from flask import Flask, render_template, request, jsonify
app = Flask(__name__)
from pymongo import MongoClient
import certifi
ca = certifi.where()
client = MongoClient('mongodb://1sparta:test@ac-j2cpxd6-shard-00-00.pyhzwix.mongodb.net:27017,ac-j2cpxd6-shard-00-01.pyhzwix.mongodb.net:27017,ac-j2cpxd6-shard-00-02.pyhzwix.mongodb.net:27017/?ssl=true&replicaSet=atlas-2769jq-shard-0&authSource=admin&retryWrites=true&w=majority', tlsCAFile=ca)
db = client.dbsparta
@app.route('/')
def home():
return render_template('index.html')
@app.route("/bucket", methods=["POST"])
def bucket_post():
bucket_receive = request.form['bucket_give']
doc = {
'bucket':bucket_receive
}
db.bucket.insert_one(doc)
return jsonify({'msg': '저장완료!'})
@app.route("/bucket", methods=["GET"])
def bucket_get():
return jsonify({'msg': 'GET 연결 완료!'})
if __name__ == '__main__':
app.run('0.0.0.0', port=5000, debug=True)
