from functions.Webhooks import Invoices
from functions.Response import sendResponse
from flask import Blueprint, request
webhooksBlueprint = Blueprint("webhooks", __name__)

@webhooksBlueprint.post("/invoices/register")
def createInvoiceWebhook():
    return sendResponse(Invoices.createInvoiceWebhook, request)


@webhooksBlueprint.post("/invoices")
def stripeInvoiceWebhook():
    return sendResponse(Invoices.stripeInvoiceWebhook, request, authRequired=False)