Skip to content

Commit e6badaf

Browse files
committed
Change author name
1 parent 8e0e0b4 commit e6badaf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/app.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def uploadpage():
5353
try:
5454
games = requests.get(app.config["DEVCADE_API_URI"] + "games/").json()
5555
for i in games:
56-
if i['author'] == current_user.id:
56+
if i['author_username'] == current_user.id:
5757
usergames.append(i)
5858
except(Exception):
5959
print("api offline")
@@ -70,7 +70,7 @@ def download(id):
7070
@login_required
7171
def deleteGame(id):
7272
game = requests.get(app.config['DEVCADE_API_URI'] + "games/" + id).json()
73-
author = game['author']
73+
author = game['author_username']
7474
if(current_user.admin or current_user.id == author):
7575
r = requests.delete(app.config["DEVCADE_API_URI"] + "games/" + id, headers={"frontend_api_key":app.config["FRONTEND_API_KEY"]})
7676
if r.status_code != 200:

0 commit comments

Comments
 (0)