Skip to content

Commit

Permalink
Improve naming consistency for Create KClip response type
Browse files Browse the repository at this point in the history
  • Loading branch information
Winston-Hsiao committed Nov 20, 2024
1 parent 9e4e50b commit 019e383
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
14 changes: 7 additions & 7 deletions frontend/src/gen/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1432,6 +1432,12 @@ export interface components {
/** Part Size */
part_size?: number | null;
};
/** CreateKClipResponse */
CreateKClipResponse: {
/** Kclip Id */
kclip_id: string;
upload_details: components["schemas"]["MultipartUploadDetails"];
};
/** CreateRefundsRequest */
CreateRefundsRequest: {
/** Payment Intent Id */
Expand Down Expand Up @@ -1769,12 +1775,6 @@ export interface components {
bio: string | null;
stripe_connect: components["schemas"]["UserStripeConnect"] | null;
};
/** NewKClipResponse */
NewKClipResponse: {
/** Kclip Id */
kclip_id: string;
upload_details: components["schemas"]["MultipartUploadDetails"];
};
/** NewKeyRequest */
NewKeyRequest: {
/**
Expand Down Expand Up @@ -4486,7 +4486,7 @@ export interface operations {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["NewKClipResponse"];
"application/json": components["schemas"]["CreateKClipResponse"];
};
};
/** @description Validation Error */
Expand Down
6 changes: 3 additions & 3 deletions store/app/routers/kclips.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class CreateKClipRequest(BaseModel):
part_size: int | None = None


class NewKClipResponse(BaseModel):
class CreateKClipResponse(BaseModel):
kclip_id: str
upload_details: MultipartUploadDetails

Expand All @@ -32,7 +32,7 @@ async def create_kclip(
user: Annotated[User, Depends(get_session_user_with_write_permission)],
kclip_data: CreateKClipRequest,
crud: Annotated[Crud, Depends(Crud.get)],
) -> NewKClipResponse:
) -> CreateKClipResponse:
kclip, upload_details = await crud.create_kclip(
user_id=user.id,
robot_id=kclip_data.robot_id,
Expand All @@ -42,7 +42,7 @@ async def create_kclip(
part_size=kclip_data.part_size,
)

return NewKClipResponse(kclip_id=kclip.id, upload_details=upload_details)
return CreateKClipResponse(kclip_id=kclip.id, upload_details=upload_details)


class CompletedKClipUploadRequest(BaseModel):
Expand Down

0 comments on commit 019e383

Please sign in to comment.