Skip to content

Open-source event management and ticket selling platform — perfect for concerts, conferences, and everything in between 🎟️ If you find this project helpful, please consider giving us a star ⭐️

358 B
Raw Blame
import {promoCodeClientPublic} from "../api/promo-code.client.ts";

export const validatePromoCode = async (eventId: string | undefined, promoCode: string): Promise<boolean | undefined> => {
    try {
        const {valid} = await promoCodeClientPublic.validateCode(eventId, promoCode);
        return valid;
    } catch {
        return undefined;
    }
};