Skip to content

Commit

Permalink
fix: formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
varbhat committed Dec 11, 2024
1 parent 3a5eacf commit 96d65b5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
11 changes: 6 additions & 5 deletions src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2526,11 +2526,12 @@ export class StreamChat<StreamChatGenerics extends ExtendableGenerics = DefaultG
*
* @return {TranslateResponse} Response that includes the message
*/
async translate(text: string, destination_language: string,source_language: string) {
return await this.post<APIResponse & TranslateResponse>(
this.baseURL + `/translate`,
{ text, source_language, destination_language },
);
async translate(text: string, destination_language: string, source_language: string) {
return await this.post<APIResponse & TranslateResponse>(this.baseURL + `/translate`, {
text,
source_language,
destination_language,
});
}

/**
Expand Down
4 changes: 2 additions & 2 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@ export type APIResponse = {
};

export type TranslateResponse = {
translated_text: string;
language: string;
}
translated_text: string;
};

export type AppSettingsAPIResponse<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = APIResponse & {
app?: {
Expand Down

0 comments on commit 96d65b5

Please sign in to comment.