Use fake metadata while the metadata are added to the manifest

This commit is contained in:
Arnaud 2024-08-15 12:09:00 +02:00
parent f1298df45d
commit 5d7b0f823f
No known key found for this signature in database
GPG Key ID: 69D6CE281FCAE663

View File

@ -1,5 +1,4 @@
import { Api } from "../api/config";
/*import { Chunks } from "../chunks/chunks";*/
import { Fetch } from "../fetch-safe/fetch-safe";
import type { SafeValue } from "../values/values";
import type { CodexDataResponse, CodexNodeSpace } from "./types";
@ -30,21 +29,21 @@ export class Data {
return data;
}
/* const mimetypes = [
"image/png",
"image/jpg",
"image/jpeg",
"audio/mp3",
"video/mp4",
"application/pdf",
"application/msdoc",
"text/plain",
];*/
const mimetypes = [
"image/png",
"image/jpg",
"image/jpeg",
"audio/mp3",
"video/mp4",
"application/pdf",
"application/msdoc",
"text/plain",
];
return {
error: false,
data: {
content: data.data.content /*.map((content) => {
content: data.data.content.map((content) => {
const random = Math.trunc(Math.random() * (mimetypes.length - 1));
const mimetype = mimetypes[random];
const [, extension] = mimetype?.split("/") || [];
@ -62,7 +61,7 @@ export class Data {
uploadedAt: new Date().toJSON(),
},
};
})*/,
}),
},
};
});