예제 #1
0
def admin_subscription_delete_category(subscription_uuid, category_uuid):
    SubscriptionCategory.delete(subscription_uuid=subscription_uuid,
                                category_uuid=category_uuid)
    subscription = Subscription.get(uuid=subscription_uuid)
    return json.dumps(subscription.to_dict()), 200, {
        'Content-Type': 'application/json'
    }
예제 #2
0
def admin_subscription_add_category(subscription_uuid):
    category_uuid = json.loads(request.data).get('category_uuid')
    SubscriptionCategory.create(subscription_uuid=subscription_uuid,
                                category_uuid=category_uuid)
    subscription = Subscription.get(uuid=subscription_uuid)
    return json.dumps(subscription.to_dict()), 200, {
        'Content-Type': 'application/json'
    }
예제 #3
0
def subscription_delete_category(subscription_uuid, category_uuid):
    SubscriptionCategory.delete(subscription_uuid=subscription_uuid, category_uuid=category_uuid)
    subscription = Subscription.get(uuid=subscription_uuid)
    return json.dumps(subscription.to_dict()), 200, {"Content-Type": "application/json"}
예제 #4
0
def subscription_add_category(subscription_uuid):
    category_uuid = json.loads(request.data).get("category_uuid")
    SubscriptionCategory.create(subscription_uuid=subscription_uuid, category_uuid=category_uuid)
    subscription = Subscription.get(uuid=subscription_uuid)
    return json.dumps(subscription.to_dict()), 200, {"Content-Type": "application/json"}
예제 #5
0
def admin_subscription_add_category(subscription_uuid):
    category_uuid = json.loads(request.data).get('category_uuid')
    SubscriptionCategory.create(subscription_uuid=subscription_uuid, category_uuid=category_uuid)
    subscription = Subscription.get(uuid=subscription_uuid)
    return json.dumps(subscription.to_dict()), 200, {'Content-Type': 'application/json'}