Skip to content

Commit

Permalink
fixed error
Browse files Browse the repository at this point in the history
  • Loading branch information
ANKUR DWIVEDI authored and ANKUR DWIVEDI committed Sep 5, 2024
1 parent 6e42fdd commit bb41a5b
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions libs/manage/file.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,19 +203,20 @@ const updateDetails = function (
return;
}

var data;
var data = {};
data = {
tags: updateData.tags,
customCoordinates: updateData.customCoordinates,
extensions: updateData.extensions,
webhookUrl: updateData.webhookUrl,
customMetadata: updateData.customMetadata,
};

if (updateData.publish)
data = {
...data,
publish: updateData.publish,
};
else
data = {
tags: updateData.tags,
customCoordinates: updateData.customCoordinates,
extensions: updateData.extensions,
webhookUrl: updateData.webhookUrl,
customMetadata: updateData.customMetadata,
};

var requestOptions = {
url: "https://api.imagekit.io/v1/files/" + fileId + "/details",
Expand Down

0 comments on commit bb41a5b

Please sign in to comment.