fix: remove unused Response import, constrain format param to Literal[json,zip]
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
from typing import Optional
|
||||
from fastapi import APIRouter, Depends, HTTPException, Response
|
||||
from typing import Literal, Optional
|
||||
from fastapi import APIRouter, Depends, HTTPException
|
||||
from fastapi.responses import StreamingResponse
|
||||
from sqlalchemy.orm import Session, selectinload
|
||||
from app import models, schemas
|
||||
@@ -81,7 +81,7 @@ def delete_config(
|
||||
@router.post("/{config_id}/generate")
|
||||
def generate_config(
|
||||
config_id: int,
|
||||
format: str = "json",
|
||||
format: Literal["json", "zip"] = "json",
|
||||
body: Optional[schemas.GenerateRequest] = None,
|
||||
db: Session = Depends(get_db),
|
||||
current_user: Optional[models.User] = Depends(get_optional_user),
|
||||
|
||||
Reference in New Issue
Block a user