kopia lustrzana https://github.com/bugout-dev/moonstream
Add MOONSTREAM_ADMIN_ACCESS_TOKEN.
rodzic
b0c00407a6
commit
6a1abea6fd
|
@ -11,7 +11,7 @@ from bugout.data import BugoutResource, BugoutResources
|
|||
from bugout.exceptions import BugoutResponseException
|
||||
|
||||
from .settings import (
|
||||
MOONSTREAM_SUBSCRIPTIONS_USER_TOKEN,
|
||||
MOONSTREAM_ADMIN_ACCESS_TOKEN,
|
||||
MOONSTREAM_APPLICATION_ID,
|
||||
bugout_client as bc,
|
||||
)
|
||||
|
@ -37,7 +37,7 @@ def add_subscription_handler(args: argparse.Namespace) -> None:
|
|||
# resolve index
|
||||
try:
|
||||
resources: BugoutResources = bc.list_resources(
|
||||
token=MOONSTREAM_SUBSCRIPTIONS_USER_TOKEN, params=params
|
||||
token=MOONSTREAM_ADMIN_ACCESS_TOKEN, params=params
|
||||
)
|
||||
new_subscription_id = (
|
||||
max(
|
||||
|
@ -72,7 +72,7 @@ def add_subscription_handler(args: argparse.Namespace) -> None:
|
|||
try:
|
||||
|
||||
resource: BugoutResource = bc.create_resource(
|
||||
token=MOONSTREAM_SUBSCRIPTIONS_USER_TOKEN,
|
||||
token=MOONSTREAM_ADMIN_ACCESS_TOKEN,
|
||||
application_id=MOONSTREAM_APPLICATION_ID,
|
||||
resource_data=resource_data,
|
||||
)
|
||||
|
|
|
@ -15,7 +15,7 @@ from ..settings import (
|
|||
DOCS_TARGET_PATH,
|
||||
DOCS_PATHS,
|
||||
MOONSTREAM_APPLICATION_ID,
|
||||
MOONSTREAM_AUTO_USER_TOKEN,
|
||||
MOONSTREAM_ADMIN_ACCESS_TOKEN,
|
||||
ORIGINS,
|
||||
bugout_client as bc,
|
||||
)
|
||||
|
@ -198,7 +198,7 @@ async def get_available_subscriptions_type(
|
|||
params = {"type": "subscription_type"}
|
||||
try:
|
||||
resources: BugoutResources = bc.list_resources(
|
||||
token=MOONSTREAM_AUTO_USER_TOKEN, params=params
|
||||
token=MOONSTREAM_ADMIN_ACCESS_TOKEN, params=params
|
||||
)
|
||||
except BugoutResponseException as e:
|
||||
raise HTTPException(status_code=e.status_code, detail=e.detail)
|
||||
|
|
Ładowanie…
Reference in New Issue