Skip to content

Commit

Permalink
fix catalog endpoint bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
shevernitskiy committed Sep 14, 2024
1 parent 31258b6 commit 428eefa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/api/catalog/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export class CatalogApi extends Endpoint {
/** Метод позволяет добавлять списки в аккаунт пакетно. */
addCatalogElements(catalog_id: number, catalogs: RequestAddCatalogElement[]): Promise<ResponseAddCatalogElements> {
return this.rest.post<ResponseAddCatalogElements>({
url: `/api/v4/catalogs/${catalog_id}`,
url: `/api/v4/catalogs/${catalog_id}/elements`,
payload: catalogs as JSONValue,
});
}
Expand Down
2 changes: 1 addition & 1 deletion src/api/catalog/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export type ResponseAddCatalogElements = Links & {

export type ResponseAddCatalogElement = ResponseGetCatalogElement;

export type RequestUpdateCatalogElement = RequestAddCatalogElement;
export type RequestUpdateCatalogElement = RequestAddCatalogElement & { id: number };

export type ResponseUpdateCatalogElements = ResponseAddCatalogElements;

Expand Down

0 comments on commit 428eefa

Please sign in to comment.