inital logic for first run check
This commit is contained in:
parent
901082fa3f
commit
f73e73ef0b
@ -66,6 +66,17 @@ class PrintAction(BaseModel):
|
|||||||
# return result
|
# return result
|
||||||
|
|
||||||
|
|
||||||
|
@app.get('/api/first_run')
|
||||||
|
def first_run():
|
||||||
|
try:
|
||||||
|
with open('.firsttimeruncheck', 'x') as f:
|
||||||
|
f.write("")
|
||||||
|
return {"status": "First Run"}
|
||||||
|
except as e:
|
||||||
|
print(e)
|
||||||
|
return {"status": "Not First Run"}
|
||||||
|
|
||||||
|
|
||||||
@app.get("/api/todos/get")
|
@app.get("/api/todos/get")
|
||||||
def get_todos(date: str = datetime.today().strftime('%Y-%m-%d'), auth_result: str = Security(auth.verify)):
|
def get_todos(date: str = datetime.today().strftime('%Y-%m-%d'), auth_result: str = Security(auth.verify)):
|
||||||
"""A valid access token is required to access this route"""
|
"""A valid access token is required to access this route"""
|
||||||
|
Loading…
Reference in New Issue
Block a user