mirror of
https://github.com/appwrite/console.git
synced 2026-06-06 19:27:48 +00:00
Close modal, and don't apply coupon
This commit is contained in:
@@ -20,13 +20,15 @@
|
||||
async function addCoupon() {
|
||||
try {
|
||||
const response = await sdk.forConsole.billing.getCoupon(coupon);
|
||||
couponData = response;
|
||||
|
||||
if (response.onlyNewOrgs && !isNewOrg) {
|
||||
show = false;
|
||||
addNotification({
|
||||
type: 'error',
|
||||
message: 'Coupon only valid for new organizations'
|
||||
});
|
||||
} else {
|
||||
couponData = response;
|
||||
dispatch('validation', couponData);
|
||||
coupon = null;
|
||||
show = false;
|
||||
|
||||
Reference in New Issue
Block a user