mirror of
https://github.com/langgenius/dify.git
synced 2026-05-27 04:16:16 +08:00
feat(api): lift identity + self-revoke to /openapi/v1/account (Phase C.9-10)
GET /v1/me moves to GET /openapi/v1/account. DELETE /v1/oauth/authorizations/self moves to DELETE /openapi/v1/account/sessions/self. Both classes (AccountApi, AccountSessionsSelfApi) are now in controllers/openapi/account.py and re-registered on service_api_ns at the legacy paths. service_api/oauth.py is now nothing but legacy re-mount declarations (20 lines). All in-place handler logic has moved to openapi/. Phase F will delete the file and the legacy mounts together. Helper functions (_load_memberships, _pick_default_workspace, _workspace_payload, _account_payload) move with the AccountApi class. Plan: docs/superpowers/plans/2026-04-26-openapi-migration.md (in difyctl repo).
This commit is contained in:
@ -14,12 +14,13 @@ api = ExternalApi(
|
||||
|
||||
openapi_ns = Namespace("openapi", description="User-scoped operations", path="/")
|
||||
|
||||
from . import index
|
||||
from . import account, index
|
||||
from .oauth_device import code as oauth_device_code
|
||||
from .oauth_device import lookup as oauth_device_lookup
|
||||
from .oauth_device import token as oauth_device_token
|
||||
|
||||
__all__ = [
|
||||
"account",
|
||||
"index",
|
||||
"oauth_device_code",
|
||||
"oauth_device_lookup",
|
||||
|
||||
Reference in New Issue
Block a user