mirror of
https://github.com/OneUptime/oneuptime.git
synced 2026-01-16 23:00:51 +00:00
- Updated comments in Probe/Config.ts to use block comments for proxy configuration. - Refactored comments in PortMonitor.ts, SyntheticMonitor.ts, and OnlineCheck.ts to block comments for better readability. - Adjusted comments in ProbeIngest/API/Monitor.ts and ProbeIngest/API/Probe.ts to block comments for clarity. - Standardized comments in various data migration scripts to block comments for consistency. - Modified eslint.config.js to enforce multiline comment style as an error.
26 lines
798 B
TypeScript
26 lines
798 B
TypeScript
/*
|
|
* To run this script:
|
|
* export $(grep -v '^#' config.env | xargs) && ts-node ./Scripts/PaymentProvider/CouponCodeGenerator.ts > coupons.csv
|
|
*/
|
|
import { PromiseVoidFunction } from "Common/Types/FunctionTypes";
|
|
import Sleep from "Common/Types/Sleep";
|
|
import BillingService from "Common/Server/Services/BillingService";
|
|
|
|
const main: PromiseVoidFunction = async (): Promise<void> => {
|
|
for (let i: number = 0; i < 2000; i++) {
|
|
const code: string = await BillingService.generateCouponCode({
|
|
name: "Name",
|
|
percentOff: 100,
|
|
durationInMonths: 12,
|
|
maxRedemptions: 1,
|
|
});
|
|
//eslint-disable-next-line no-console
|
|
console.log(code);
|
|
await Sleep.sleep(50);
|
|
}
|
|
};
|
|
|
|
main().catch((err: Error) => {
|
|
//eslint-disable-next-line no-console
|
|
console.error(err);
|
|
});
|