Skip to content

Commit 11c93be

Browse files
author
Khaled
committed
Merge branch 'master' into flaskBranch
2 parents 256d992 + fe0291c commit 11c93be

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

flask/databaseOperations.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def printall():
6363

6464
def injectData(data):
6565
# Assume first row of data is header
66-
print("This should be the header: "+data.pop(0)) # remove header
66+
print("This should be the header: ", data.pop(0)) # remove header
6767
for row in data:
6868
addpost(row)
6969
return "All data inserted"
@@ -142,6 +142,4 @@ def unSubAll(userID):
142142
topicList+=","
143143
# print(topicList)
144144
unSub(userID,topicList)
145-
return "user unsubscribed from all"
146-
147-
145+
return "user unsubscribed from all"

flask/flaskapp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def postJson():
8484
new_data.close()
8585

8686
# Put data into DB
87-
db.injectData(sorted(ReadCSV(filename),key= lambda x: x["updated_at"],reverse=True))
87+
db.injectData(sorted(ReadCSV(filename),key= lambda x: x[17],reverse=True)) #where updated_at is
8888
return Response("We received something")
8989

9090
@app.route("/addUserSubscriptionAll", methods=['POST'])

0 commit comments

Comments
 (0)