mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-08 05:39:13 +00:00
s/aget_all_filenames_by_source/get_all_filenames_by_source as sync func
This commit is contained in:
@@ -796,7 +796,7 @@ class EntryAdapters:
|
|||||||
return await Entry.objects.filter(user=user, file_path=file_path).adelete()
|
return await Entry.objects.filter(user=user, file_path=file_path).adelete()
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def aget_all_filenames_by_source(user: KhojUser, file_source: str):
|
def get_all_filenames_by_source(user: KhojUser, file_source: str):
|
||||||
return (
|
return (
|
||||||
Entry.objects.filter(user=user, file_source=file_source)
|
Entry.objects.filter(user=user, file_source=file_source)
|
||||||
.distinct("file_path")
|
.distinct("file_path")
|
||||||
|
|||||||
@@ -225,7 +225,7 @@ async def get_all_filenames(
|
|||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
return await sync_to_async(list)(EntryAdapters.aget_all_filenames_by_source(user, content_source)) # type: ignore[call-arg]
|
return await sync_to_async(list)(EntryAdapters.get_all_filenames_by_source(user, content_source)) # type: ignore[call-arg]
|
||||||
|
|
||||||
|
|
||||||
@api_config.post("/data/conversation/model", status_code=200)
|
@api_config.post("/data/conversation/model", status_code=200)
|
||||||
|
|||||||
@@ -120,7 +120,7 @@ async def auth(request: Request):
|
|||||||
api="create_user",
|
api="create_user",
|
||||||
metadata={"user_id": str(khoj_user.uuid)},
|
metadata={"user_id": str(khoj_user.uuid)},
|
||||||
)
|
)
|
||||||
logger.log(logging.INFO, f"New User Created: {khoj_user.uuid}")
|
logger.log(logging.INFO, f"🥳 New User Created: {khoj_user.uuid}")
|
||||||
return RedirectResponse(url=f"{next_url}", status_code=HTTP_302_FOUND)
|
return RedirectResponse(url=f"{next_url}", status_code=HTTP_302_FOUND)
|
||||||
|
|
||||||
return RedirectResponse(url=f"{next_url}")
|
return RedirectResponse(url=f"{next_url}")
|
||||||
|
|||||||
Reference in New Issue
Block a user