Skip to content

Commit 3fbd7ba

Browse files
committed
implement feedback
Signed-off-by: Lukas Schaefer <lukas@lschaefer.xyz>
1 parent e746634 commit 3fbd7ba

2 files changed

Lines changed: 4 additions & 6 deletions

File tree

appinfo/info.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Setup background job workers as described here: https://docs.nextcloud.com/serve
3939
</docker-install>
4040
<routes>
4141
<route>
42-
<url>download-logs</url>
42+
<url>downloadLogs</url>
4343
<verb>GET</verb>
4444
<access_level>ADMIN</access_level>
4545
<headers_to_exclude>[]</headers_to_exclude>

context_chat_backend/controller.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22
# SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors
33
# SPDX-License-Identifier: AGPL-3.0-or-later
44
#
5-
import zipfile
6-
7-
from starlette.responses import FileResponse
85

96
# isort: off
107
from .chain.types import ContextException, LLMOutput, ScopeType, SearchResult
@@ -17,9 +14,11 @@
1714
import os
1815
import tempfile
1916
import threading
17+
import zipfile
2018
from collections.abc import Callable
2119
from contextlib import asynccontextmanager
2220
from functools import wraps
21+
from starlette.responses import FileResponse
2322
from threading import Event, Thread
2423
from time import sleep
2524
from typing import Annotated, Any
@@ -498,8 +497,7 @@ def _(query: Query) -> list[SearchResult]:
498497
))
499498

500499

501-
@app.get('/download-logs')
502-
@enabled_guard(app)
500+
@app.get('/downloadLogs')
503501
def download_logs() -> FileResponse:
504502
with tempfile.NamedTemporaryFile('wb', delete=False) as tmp:
505503
with zipfile.ZipFile(tmp, mode='w', compression=zipfile.ZIP_DEFLATED) as zip_file:

0 commit comments

Comments
 (0)