inital logic for first run check

This commit is contained in:
samerbam 2023-08-24 23:26:16 -04:00
parent 901082fa3f
commit f73e73ef0b

View File

@ -66,6 +66,17 @@ class PrintAction(BaseModel):
# 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")
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"""