Skip to content

Commit

Permalink
Update app.py
Browse files Browse the repository at this point in the history
# Changed query to only show articles from the user logged in
  • Loading branch information
cihernand authored Oct 26, 2018
1 parent 11ab254 commit ea55c20
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,9 @@ def dashboard():
cur = mysql.connection.cursor()

# Get articles
result = cur.execute("SELECT * FROM articles")
#result = cur.execute("SELECT * FROM articles")
# Show articles only from the user logged in
result = cur.execute("SELECT * FROM articles WHERE author = %s", [session['username']])

articles = cur.fetchall()

Expand Down

0 comments on commit ea55c20

Please sign in to comment.