Skip to content

Commit

Permalink
fix collection edit (#44)
Browse files Browse the repository at this point in the history
* chores_lint_errors_and_path_issues

* feature_db_py

* fix_audio_issue

* chores_lint_error

* fix_openAPI_switching

* chore_module_insert

* fix_edit_collection_fix
  • Loading branch information
Serhii Ofii authored Oct 2, 2024
1 parent e3e2cf4 commit 7317f97
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 5 additions & 1 deletion frontend/src/gen/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1596,7 +1596,11 @@ export interface operations {
path?: never;
cookie?: never;
};
requestBody?: Collection;
requestBody: {
content: {
"application/json": Collection;
};
};
responses: {
/** @description Successful Response */
200: {
Expand Down
4 changes: 3 additions & 1 deletion frontend/src/pages/Collection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,9 @@ const CollectionPage: React.FC = () => {
const asyncfunction = async () => {
startLoading();
collection.images = reorderImageIds;
const { error } = await client.POST("/edit_collection", { collection });
const { error } = await client.POST("/edit_collection", {
body: collection,
});
if (error) addAlert(error.detail?.toString(), "error");
else {
setCollection({ ...collection });
Expand Down

0 comments on commit 7317f97

Please sign in to comment.