ambon commited on
Commit
1dce11f
·
verified ·
1 Parent(s): ff58bb1

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +14 -8
main.py CHANGED
@@ -111,6 +111,12 @@ with app.app_context():
111
  """
112
  Run update_genshin before handling the first request.
113
  """
 
 
 
 
 
 
114
  asyncio.run(update_genshin())
115
 
116
  async def card(id, designtype):
@@ -146,16 +152,16 @@ def characters(id):
146
  def hello_world():
147
  return 'AMERICA YA HALLO!!'
148
 
149
- @app.route("/update_char")
150
- def upload():
151
- data_dirs = ["/tmp/data", "/tmp/langs"]
152
 
153
- for directory in data_dirs:
154
- if not os.path.exists(directory):
155
- os.makedirs(directory)
156
 
157
- asyncio.run(update_genshin())
158
- return 'Update completed!'
159
 
160
  def upload_image(data):
161
  """
 
111
  """
112
  Run update_genshin before handling the first request.
113
  """
114
+ data_dirs = ["/tmp/data", "/tmp/langs"]
115
+
116
+ for directory in data_dirs:
117
+ if not os.path.exists(directory):
118
+ os.makedirs(directory)
119
+
120
  asyncio.run(update_genshin())
121
 
122
  async def card(id, designtype):
 
152
  def hello_world():
153
  return 'AMERICA YA HALLO!!'
154
 
155
+ # @app.route("/update_char")
156
+ # def upload():
157
+ # data_dirs = ["/tmp/data", "/tmp/langs"]
158
 
159
+ # for directory in data_dirs:
160
+ # if not os.path.exists(directory):
161
+ # os.makedirs(directory)
162
 
163
+ # asyncio.run(update_genshin())
164
+ # return 'Update completed!'
165
 
166
  def upload_image(data):
167
  """