Skip to content

Commit

Permalink
hotfix: update api projects
Browse files Browse the repository at this point in the history
  • Loading branch information
DavideSilva committed Jun 7, 2024
1 parent ed4f198 commit 0453918
Showing 1 changed file with 48 additions and 47 deletions.
95 changes: 48 additions & 47 deletions packages/web-app/app/api/sale/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,51 +14,52 @@ BigInt.prototype.toJSON = function () {
export const dynamic = 'force-static';

export async function GET(_request: Request) {
const details = await saleDetails();

if (typeof details === 'object' && 'error' in details) {
return new Response(`Sales details error: ${details.error}`, {
status: 500,
});
}

const tempDetails = details.map((project) => {
return {
...project,
minTarget: formatUnits(project.minTarget, 6),
maxTarget: formatUnits(project.maxTarget, 6),
};
});

const host = process.env.NEXT_PUBLIC_DAPP_HOST;

const extendedWithTBA = [
...tempDetails,
{
address: 'TBA',
publicKey: 'TBA',
project: 'The Posemesh (AUKI)',
description:
'The DePIN for AI Perception. The posemesh is a decentralized machine perception network for the next 100 billion people, devices and AI.',
status: 'upcoming',
rate: 'TBA',
minTarget: 'TBA',
maxTarget: 'TBA',
start: 'TBA',
end: 'TBA',
minContribution: 'TBA',
maxContribution: 'TBA',
totalTokensForSale: 'TBA',
startRegistration: 'TBA',
endRegistration: 'TBA',
url: 'TBA',
logo: `${host}/auki-logo.png`,
background: `${host}/auki-card-background.png`,
backgroundMobile: `${host}/auki-card-background.png`,
supplyPercentage: 'TBA',
currentPrice: 'TBA',
},
];

return Response.json(extendedWithTBA);
return Response.json([]);
// const details = await saleDetails();
//
// if (typeof details === 'object' && 'error' in details) {
// return new Response(`Sales details error: ${details.error}`, {
// status: 500,
// });
// }
//
// const tempDetails = details.map((project) => {
// return {
// ...project,
// minTarget: formatUnits(project.minTarget, 6),
// maxTarget: formatUnits(project.maxTarget, 6),
// };
// });
//
// const host = process.env.NEXT_PUBLIC_DAPP_HOST;
//
// const extendedWithTBA = [
// ...tempDetails,
// {
// address: 'TBA',
// publicKey: 'TBA',
// project: 'The Posemesh (AUKI)',
// description:
// 'The DePIN for AI Perception. The posemesh is a decentralized machine perception network for the next 100 billion people, devices and AI.',
// status: 'upcoming',
// rate: 'TBA',
// minTarget: 'TBA',
// maxTarget: 'TBA',
// start: 'TBA',
// end: 'TBA',
// minContribution: 'TBA',
// maxContribution: 'TBA',
// totalTokensForSale: 'TBA',
// startRegistration: 'TBA',
// endRegistration: 'TBA',
// url: 'TBA',
// logo: `${host}/auki-logo.png`,
// background: `${host}/auki-card-background.png`,
// backgroundMobile: `${host}/auki-card-background.png`,
// supplyPercentage: 'TBA',
// currentPrice: 'TBA',
// },
// ];
//
// return Response.json(extendedWithTBA);
}

0 comments on commit 0453918

Please sign in to comment.