fix: handler
This commit is contained in:
parent
dfd39412f6
commit
f5786d5d1e
@ -4,6 +4,6 @@ from persica.context.application import ApplicationContext
|
||||
app = (
|
||||
ApplicationBuilder()
|
||||
.set_application_context_class(ApplicationContext)
|
||||
.set_scanner_packages(["src.core", "src.plugin", "src.route"])
|
||||
.set_scanner_packages(["src.core", "src.services", "src.plugin", "src.route"])
|
||||
.build()
|
||||
)
|
||||
|
@ -1,2 +1 @@
|
||||
from ._handler import handler
|
||||
from ._plugin import Plugin
|
||||
|
@ -90,7 +90,7 @@ class _GetHandler(_Handler):
|
||||
def __init__(
|
||||
self,
|
||||
path: str,
|
||||
admin: bool = False,
|
||||
admin: bool = True,
|
||||
student: bool = False,
|
||||
out: bool = False,
|
||||
**kwargs,
|
||||
@ -110,7 +110,7 @@ class _PostHandler(_Handler):
|
||||
def __init__(
|
||||
self,
|
||||
path: str,
|
||||
admin: bool = False,
|
||||
admin: bool = True,
|
||||
student: bool = False,
|
||||
out: bool = False,
|
||||
**kwargs,
|
||||
|
@ -3,12 +3,12 @@ from typing import TYPE_CHECKING
|
||||
from fastapi_amis_admin.crud import BaseApiOut
|
||||
|
||||
from fastapi import HTTPException
|
||||
from persica.factory.component import AsyncInitializingComponent
|
||||
from starlette import status
|
||||
from starlette.requests import Request
|
||||
from starlette.responses import Response
|
||||
|
||||
from src.plugin import Plugin, handler
|
||||
from src.plugin import handler
|
||||
from src.plugin.plugin import Plugin
|
||||
from src.services.users.schemas import (
|
||||
UserRegIn,
|
||||
SystemUserEnum,
|
||||
@ -21,7 +21,7 @@ if TYPE_CHECKING:
|
||||
from fastapi_user_auth.auth import Auth
|
||||
|
||||
|
||||
class UserRoutes(Plugin, AsyncInitializingComponent):
|
||||
class UserRoutes(Plugin):
|
||||
_prefix = "/user"
|
||||
|
||||
def __init__(self, user_services: UserServices):
|
||||
|
Loading…
Reference in New Issue
Block a user