Skip to content

Commit

Permalink
fix:error
Browse files Browse the repository at this point in the history
  • Loading branch information
vastsa committed Oct 7, 2024
1 parent cc3a521 commit 7c98046
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 0 additions & 4 deletions apps/admin/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@ class IDData(BaseModel):
id: int


class ConfigUpdateData(BaseModel):
admin_token: str


class ShareItem(BaseModel):
expire_value: int
expire_style: str = 'day'
Expand Down
4 changes: 2 additions & 2 deletions apps/admin/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from fastapi import APIRouter, Depends
from apps.admin.services import FileService, ConfigService, LocalFileService
from apps.admin.dependencies import admin_required, get_file_service, get_config_service, get_local_file_service
from apps.admin.schemas import IDData, ConfigUpdateData, ShareItem, DeleteItem
from apps.admin.schemas import IDData, ShareItem, DeleteItem
from core.response import APIResponse

admin_api = APIRouter(prefix='/admin', tags=['管理'])
Expand Down Expand Up @@ -53,7 +53,7 @@ async def get_config(

@admin_api.patch('/config/update')
async def update_config(
data: ConfigUpdateData,
data: dict,
config_service: ConfigService = Depends(get_config_service),
admin: bool = Depends(admin_required)
):
Expand Down

0 comments on commit 7c98046

Please sign in to comment.