feat(api/data/create-link): return created links data

This commit is contained in:
Aminejv 2022-11-07 14:47:23 +01:00
parent 0f7852c5b7
commit 2189dd93a3
2 changed files with 2 additions and 2 deletions

View File

@ -76,7 +76,7 @@ export function createUploadProvider({
if (!response || response.error) throw new Error(response);
const isDuplicate = response.data?.duplicate;
const fileCid = response.data?.links[0];
const fileCid = response.data?.links[0].cid;
UploadStore.uploadedFiles[fileKey] = true;
if (isDuplicate) {

View File

@ -146,6 +146,6 @@ export default async (req, res) => {
return res.status(200).send({
decorator,
data: { added, links: filteredFiles.map((file) => file.cid), skipped: files.length - added },
data: { added, links: createdFiles, skipped: files.length - added },
});
};