untuk menghindari masalah CORS
This commit is contained in:
parent
fddd89bcfb
commit
b89e2ade33
@ -42,7 +42,9 @@ 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) )
|
||||
|
Loading…
Reference in New Issue
Block a user