cirrections
Browse files
main.py
CHANGED
|
@@ -137,7 +137,6 @@ def raw_sql(raw_sql: RawSql):
|
|
| 137 |
@app.post(api_base+"/walk")
|
| 138 |
def walk(path: PathRequest):
|
| 139 |
print("Received walk request")
|
| 140 |
-
response= JSONResponse(content= {"dirs":[]})
|
| 141 |
dirs=[]
|
| 142 |
try:
|
| 143 |
for root, items, files in os.walk(path.dir,topdown=True):
|
|
@@ -145,8 +144,7 @@ def walk(path: PathRequest):
|
|
| 145 |
dirs.append(item)
|
| 146 |
except Exception:
|
| 147 |
print("got exception",Exception)
|
| 148 |
-
|
| 149 |
-
response['dirs']=dirs
|
| 150 |
return response
|
| 151 |
|
| 152 |
@app.get(api_base+"/heartbeat")
|
|
|
|
| 137 |
@app.post(api_base+"/walk")
|
| 138 |
def walk(path: PathRequest):
|
| 139 |
print("Received walk request")
|
|
|
|
| 140 |
dirs=[]
|
| 141 |
try:
|
| 142 |
for root, items, files in os.walk(path.dir,topdown=True):
|
|
|
|
| 144 |
dirs.append(item)
|
| 145 |
except Exception:
|
| 146 |
print("got exception",Exception)
|
| 147 |
+
response= JSONResponse(content= {"dirs":dirs})
|
|
|
|
| 148 |
return response
|
| 149 |
|
| 150 |
@app.get(api_base+"/heartbeat")
|