diff --git a/backend/endpoints/collections.py b/backend/endpoints/collections.py index 3d0720f7e..58f22cb91 100644 --- a/backend/endpoints/collections.py +++ b/backend/endpoints/collections.py @@ -213,7 +213,9 @@ def get_virtual_collections( list[VirtualCollectionSchema]: List of virtual collections """ - virtual_collections = db_collection_handler.get_virtual_collections(type, limit) + virtual_collections = db_collection_handler.get_virtual_collections( + type=type, limit=limit + ) return [VirtualCollectionSchema.model_validate(vc) for vc in virtual_collections] @@ -228,11 +230,11 @@ def get_virtual_collection_identifiers( request (Request): Fastapi Request object Returns: - list[int]: List of virtual collection IDs + list[str]: List of generated virtual collection IDs """ virtual_collections = db_collection_handler.get_virtual_collections( - request.user.id, + type="all", only_fields=[VirtualCollection.name, VirtualCollection.type], ) diff --git a/backend/endpoints/firmware.py b/backend/endpoints/firmware.py index 83bd4bf4d..4e121dd8b 100644 --- a/backend/endpoints/firmware.py +++ b/backend/endpoints/firmware.py @@ -1,6 +1,6 @@ from typing import Annotated -from fastapi import Body, File, HTTPException, Query, Request, UploadFile, status +from fastapi import Body, File, HTTPException, Request, UploadFile, status from fastapi.responses import FileResponse from config import DISABLE_DOWNLOAD_ENDPOINT_AUTH diff --git a/backend/endpoints/saves.py b/backend/endpoints/saves.py index 2fc1545d0..b45b2db5c 100644 --- a/backend/endpoints/saves.py +++ b/backend/endpoints/saves.py @@ -1,7 +1,7 @@ from datetime import datetime, timezone from typing import Annotated -from fastapi import Body, HTTPException, Query, Request, UploadFile, status +from fastapi import Body, HTTPException, Request, UploadFile, status from decorators.auth import protected_route from endpoints.responses.assets import SaveSchema diff --git a/backend/endpoints/states.py b/backend/endpoints/states.py index 5ef4df07c..a2df7b850 100644 --- a/backend/endpoints/states.py +++ b/backend/endpoints/states.py @@ -1,7 +1,7 @@ from datetime import datetime, timezone from typing import Annotated -from fastapi import Body, HTTPException, Query, Request, UploadFile, status +from fastapi import Body, HTTPException, Request, UploadFile, status from decorators.auth import protected_route from endpoints.responses.assets import StateSchema diff --git a/backend/endpoints/user.py b/backend/endpoints/user.py index c30ecc531..a100e2e59 100644 --- a/backend/endpoints/user.py +++ b/backend/endpoints/user.py @@ -3,7 +3,7 @@ from typing import Annotated, Any, cast from fastapi import Body, Form, HTTPException from fastapi import Path as PathVar -from fastapi import Query, Request, status +from fastapi import Request, status from decorators.auth import protected_route from endpoints.forms.identity import UserForm