mirror of
https://github.com/filecoin-project/slate.git
synced 2024-11-28 23:12:32 +03:00
feat(api/data/create-link): return created links data
This commit is contained in:
parent
0f7852c5b7
commit
2189dd93a3
@ -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) {
|
||||
|
@ -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 },
|
||||
});
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user