Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Luc-Aka-Evy committed May 19, 2022
1 parent 3864978 commit e2d03b2
Showing 1 changed file with 6 additions and 17 deletions.
23 changes: 6 additions & 17 deletions server.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,15 @@


def loadClubs():
try:
with open('clubs.json') as c:
listOfClubs = json.load(c)['clubs']
return listOfClubs
except Exception as e:
with open('../clubs.json') as c:
listOfClubs = json.load(c)['clubs']
return listOfClubs
with open('clubs.json') as c:
listOfClubs = json.load(c)['clubs']
return listOfClubs


def loadCompetitions():
try:
with open('competitions.json') as comps:
listOfCompetitions = json.load(comps)['competitions']
return listOfCompetitions
except Exception as e:
with open('../competitions.json') as comps:
listOfCompetitions = json.load(comps)['competitions']
return listOfCompetitions

with open('competitions.json') as comps:
listOfCompetitions = json.load(comps)['competitions']
return listOfCompetitions

app = Flask(__name__)
app.secret_key = 'something_special'
Expand Down

0 comments on commit e2d03b2

Please sign in to comment.