chore:little fixes and formating and linting and patches
This commit is contained in:
@@ -38,7 +38,9 @@ async function promptForInput() {
|
||||
name: 'polarApiKey',
|
||||
message: 'Enter your Polar API key:',
|
||||
validate: (input: string) => {
|
||||
if (!input) return 'API key is required';
|
||||
if (!input) {
|
||||
return 'API key is required';
|
||||
}
|
||||
return true;
|
||||
},
|
||||
},
|
||||
@@ -76,7 +78,7 @@ async function main() {
|
||||
const exists = products.find(
|
||||
(p) =>
|
||||
p.metadata?.eventsLimit === price.events &&
|
||||
p.recurringInterval === 'month',
|
||||
p.recurringInterval === 'month'
|
||||
);
|
||||
if (exists) {
|
||||
console.log('Free product already exists:');
|
||||
@@ -129,13 +131,13 @@ async function main() {
|
||||
(p) =>
|
||||
p.metadata?.eventsLimit === price.events &&
|
||||
p.recurringInterval === 'month' &&
|
||||
p.name === productCreate.name,
|
||||
p.name === productCreate.name
|
||||
);
|
||||
const yearlyProductExists = products.find(
|
||||
(p) =>
|
||||
p.metadata?.eventsLimit === price.events &&
|
||||
p.recurringInterval === 'year' &&
|
||||
p.name === `${productCreate.name} (yearly)`,
|
||||
p.name === `${productCreate.name} (yearly)`
|
||||
);
|
||||
|
||||
if (monthlyProductExists) {
|
||||
|
||||
Reference in New Issue
Block a user