fix(medusa): Revert status type in API (#5428)
This commit is contained in:
6
.changeset/rich-bags-cry.md
Normal file
6
.changeset/rich-bags-cry.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
"@medusajs/admin-ui": patch
|
||||
"@medusajs/medusa": patch
|
||||
---
|
||||
|
||||
fix(medusa): Update status type in API payload definition
|
||||
@@ -132,6 +132,7 @@ const useEditProductActions = (productId: string) => {
|
||||
const newStatus = currentStatus === "published" ? "draft" : "published"
|
||||
updateProduct.mutate(
|
||||
{
|
||||
// @ts-ignore TODO fix update type in API
|
||||
status: newStatus,
|
||||
},
|
||||
{
|
||||
|
||||
@@ -669,7 +669,7 @@ export class AdminPostProductsProductReq {
|
||||
@IsEnum(ProductStatus)
|
||||
@NotEquals(null)
|
||||
@ValidateIf((object, value) => value !== undefined)
|
||||
status: ProductStatus
|
||||
status?: ProductStatus
|
||||
|
||||
@IsOptional()
|
||||
@Type(() => ProductTypeReq)
|
||||
|
||||
Reference in New Issue
Block a user