diff --git a/backend/app/routes/admin.py b/backend/app/routes/admin.py index f141c0a..1ded2ce 100644 --- a/backend/app/routes/admin.py +++ b/backend/app/routes/admin.py @@ -497,48 +497,6 @@ def get_customer(customer_id): }), 500 -@admin_bp.route('/customers//plan', methods=['PUT']) -def update_customer_plan(customer_id): - """Müşterinin planını güncelle""" - try: - data = request.json - customer = Customer.query.get(customer_id) - - if not customer: - return jsonify({ - "status": "error", - "message": "Müşteri bulunamadı" - }), 404 - - # Update plan - if 'subscription_plan' in data: - customer.subscription_plan = data['subscription_plan'] - - if 'max_domains' in data: - customer.max_domains = data['max_domains'] - - if 'max_containers' in data: - customer.max_containers = data['max_containers'] - - if 'subscription_status' in data: - customer.subscription_status = data['subscription_status'] - - db.session.commit() - - return jsonify({ - "status": "success", - "message": "Plan başarıyla güncellendi", - "customer": customer.to_dict() - }) - - except Exception as e: - db.session.rollback() - return jsonify({ - "status": "error", - "message": f"Plan güncellenirken hata: {str(e)}" - }), 500 - - @admin_bp.route('/customers/', methods=['PUT']) def update_customer(customer_id): """Müşteri bilgilerini güncelle"""