Skip to content

Commit

Permalink
fix: assert values exist
Browse files Browse the repository at this point in the history
  • Loading branch information
Krish120003 committed Jan 11, 2025
1 parent 7dcc08c commit 0a6b3c9
Showing 1 changed file with 31 additions and 39 deletions.
70 changes: 31 additions & 39 deletions src/app/api/wallet/apple/[id]/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,48 +78,40 @@ export const GET = async (

// throw new Error("Not implemented");

const wwdr = (
await prisma.config.findFirst({
where: {
name: "APPLE_WWDR",
},
})
)?.value;
const wwdr = (await prisma.config.findFirst({
where: {
name: "APPLE_WWDR",
},
}))!.value;

const signerCert = (
await prisma.config.findFirst({
where: {
name: "APPLE_SIGNER_CERT",
},
})
)?.value;
const signerCert = (await prisma.config.findFirst({
where: {
name: "APPLE_SIGNER_CERT",
},
}))!.value;

const signerKey = (
await prisma.config.findFirst({
where: {
name: "APPLE_SIGNER_KEY",
},
})
)?.value;
const signerKey = (await prisma.config.findFirst({
where: {
name: "APPLE_SIGNER_KEY",
},
}))!.value;

const signerKeyPassphrase = (
await prisma.config.findFirst({
where: {
name: "APPLE_SIGNER_KEY_PASSPHRASE",
},
})
)?.value;

console.log("IS WWDR SAME?", wwdr === env.APPLE_WWDR);
console.log(wwdr);
console.log(env.APPLE_WWDR);
console.log("=================================");
console.log("IS SIGNER CERT SAME?", signerCert === env.APPLE_SIGNER_CERT);
console.log("IS SIGNER KEY SAME?", signerKey === env.APPLE_SIGNER_KEY);
console.log(
"IS SIGNER KEY PASS SAME?",
signerKeyPassphrase === env.APPLE_SIGNER_KEY_PASSPHRASE
);
const signerKeyPassphrase = (await prisma.config.findFirst({
where: {
name: "APPLE_SIGNER_KEY_PASSPHRASE",
},
}))!.value;

// console.log("IS WWDR SAME?", wwdr === env.APPLE_WWDR);
// console.log(wwdr);
// console.log(env.APPLE_WWDR);
// console.log("=================================");
// console.log("IS SIGNER CERT SAME?", signerCert === env.APPLE_SIGNER_CERT);
// console.log("IS SIGNER KEY SAME?", signerKey === env.APPLE_SIGNER_KEY);
// console.log(
// "IS SIGNER KEY PASS SAME?",
// signerKeyPassphrase === env.APPLE_SIGNER_KEY_PASSPHRASE
// );

// const { wwdr, signerCert, signerKey, signerKeyPassphrase } = getCertificatesContentsSomehow();

Expand Down

0 comments on commit 0a6b3c9

Please sign in to comment.