untuk menghindari masalah CORS

This commit is contained in:
Dita Aji Pratama 2025-06-17 10:44:45 +07:00
parent fddd89bcfb
commit b89e2ade33

View File

@ -41,8 +41,10 @@ def list(crud):
db_main = mariadb.connect(**database.db_main)
cursor = db_main.cursor(dictionary=True)
if crud == "create":
if request.method == 'OPTIONS':
return None
elif crud == "create":
name = params["name" ]
phone = params["phone" ]
cursor.execute("INSERT INTO `member` VALUES (DEFAULT, %s, %s) ;" , (name, phone) )