mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-04-30 03:00:41 -04:00
fix(server): revert accidental undo changes
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
# Analytics API
|
||||
|
||||
import typing
|
||||
from typing import Annotated
|
||||
from typing import Annotated, Optional
|
||||
|
||||
import fastapi
|
||||
import prisma
|
||||
@@ -20,10 +20,6 @@ class UserData(pydantic.BaseModel):
|
||||
username: str
|
||||
|
||||
|
||||
class TutorialStepData(pydantic.BaseModel):
|
||||
data: typing.Optional[dict]
|
||||
|
||||
|
||||
@router.post(path="/log_new_user")
|
||||
async def log_create_user(
|
||||
user_id: Annotated[str, fastapi.Depends(get_user_id)],
|
||||
@@ -45,8 +41,8 @@ async def log_create_user(
|
||||
@router.post(path="/log_tutorial_step")
|
||||
async def log_tutorial_step(
|
||||
user_id: Annotated[str, fastapi.Depends(get_user_id)],
|
||||
step: Annotated[int, fastapi.Query(..., embed=True)],
|
||||
data: Annotated[TutorialStepData, fastapi.Body(..., embed=True)],
|
||||
step: Annotated[int, fastapi.Body(..., embed=True)],
|
||||
data: Annotated[Optional[dict], fastapi.Body(..., embed=True)],
|
||||
):
|
||||
"""
|
||||
Log the tutorial step completed by the user for analytics purposes.
|
||||
@@ -55,7 +51,7 @@ async def log_tutorial_step(
|
||||
data={
|
||||
"userId": user_id,
|
||||
"type": prisma.enums.AnalyticsType.TUTORIAL_STEP,
|
||||
"data": prisma.Json(data.model_dump_json()),
|
||||
"data": prisma.Json(data),
|
||||
"dataIndex": step,
|
||||
}
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user