Skip to content

Commit 34c721a

Browse files
committed
testing bringing connection into class again
1 parent e86c32e commit 34c721a

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

app.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,10 @@
1313
parser = reqparse.RequestParser()
1414
parser.add_argument('customer')
1515

16-
# Create connection to Azure SQL
17-
conn = pyodbc.connect(os.environ['SQLAZURECONNSTR_WWIF'])
18-
1916
class Queryable(Resource):
2017
def executeQueryJson(self, verb, payload=None):
2118
result = {}
19+
conn = pyodbc.connect(os.environ['SQLAZURECONNSTR_WWIF'])
2220
cursor = conn.cursor()
2321
entity = type(self).__name__.lower()
2422
procedure = f"web.{verb}_{entity}"

0 commit comments

Comments
 (0)