fix(medusa): Revert status type in API (#5428)
This commit is contained in:
1 parent
2ac05066ac
commit
ebba93e03d
3 files changed
+8
-1
No files matched your search
@@ -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"
|
const newStatus = currentStatus === "published" ? "draft" : "published"
|
||||||
updateProduct.mutate(
|
updateProduct.mutate(
|
||||||
{
|
{
|
||||||
|
// @ts-ignore TODO fix update type in API
|
||||||
status: newStatus,
|
status: newStatus,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -669,7 +669,7 @@ export class AdminPostProductsProductReq {
|
|||||||
@IsEnum(ProductStatus)
|
@IsEnum(ProductStatus)
|
||||||
@NotEquals(null)
|
@NotEquals(null)
|
||||||
@ValidateIf((object, value) => value !== undefined)
|
@ValidateIf((object, value) => value !== undefined)
|
||||||
status: ProductStatus
|
status?: ProductStatus
|
||||||
|
|
||||||
@IsOptional()
|
@IsOptional()
|
||||||
@Type(() => ProductTypeReq)
|
@Type(() => ProductTypeReq)
|
||||||
|
|||||||
Reference in new issue
Block a user