Skip to content

Remove refund functionality from web and CLI interfaces#4

Merged
tayyebi merged 3 commits intomainfrom
copilot/remove-refund-endpoints
Jan 7, 2026
Merged

Remove refund functionality from web and CLI interfaces#4
tayyebi merged 3 commits intomainfrom
copilot/remove-refund-endpoints

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jan 7, 2026

Removes all refund-related endpoints, handlers, templates, and CLI commands from the codebase.

Deleted

  • src/templates/bulk_refund_template.rs
  • templates/bulk_refund.html
  • templates/bulk_refund_result.html
  • templates/subscription_refund.html

Routes Removed

  • GET /instance/:instance_id/subscription-refund
  • GET /bulk-subscription-refund
  • POST /bulk-subscription-refund

Handlers Removed

  • instance_subscription_refund() - single instance refund handler
  • bulk_subscription_refund() - bulk refund POST handler
  • bulk_subscription_refund_get() - bulk refund form display
  • BulkRefundForm - form struct for bulk operations

CLI

  • Removed zy instances subscription-refund subcommand

UI

  • Removed "Bulk refunds" navigation link from owner menu in templates/base.html

Total: 8 files changed, 195 deletions

Original prompt

Objective

Remove all refund-related endpoints, pages, menus, templates, and handler functions from the CloudzyVPS CLI project.

Files to Delete

  1. src/templates/bulk_refund_template.rs - Template struct for bulk refund page
  2. templates/bulk_refund.html - Bulk refund form page
  3. templates/bulk_refund_result.html - Bulk refund results display page
  4. templates/subscription_refund.html - Individual subscription refund page

Files to Modify

1. src/main.rs

Remove the following route definitions:

  • The route for /instance/:instance_id/subscription-refund with GET handler handlers::instances::instance_subscription_refund
  • The route for /bulk-subscription-refund with GET and POST handlers handlers::instances::bulk_subscription_refund_get and handlers::instances::bulk_subscription_refund

2. src/handlers/instances.rs

Remove these functions and structs:

  • pub async fn instance_subscription_refund() function (around lines 580-590)
  • #[derive(Deserialize)] pub struct BulkRefundForm struct (around line 593)
  • pub async fn bulk_subscription_refund() function (around lines 596-622)
  • pub async fn bulk_subscription_refund_get() function (around lines 624-639)

3. src/templates/mod.rs

Remove:

  • Line 11: pub mod bulk_refund_template;
  • Line 41: pub use bulk_refund_template::BulkRefundTemplate;

4. templates/base.html

Remove line 39:

<a href="{{ base_url }}/bulk-subscription-refund">Bulk refunds</a>

Expected Result

After these changes:

  • No refund-related routes will be accessible
  • The "Bulk refunds" menu item will be removed from the navigation
  • All refund template files and handler functions will be deleted
  • The codebase will have no references to refund functionality

This pull request was created from Copilot chat.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

…dlers

Co-authored-by: tayyebi <14053493+tayyebi@users.noreply.github.com>
Copilot AI changed the title [WIP] Remove refund-related endpoints and templates from CloudzyVPS CLI Remove refund functionality from web and CLI interfaces Jan 7, 2026
Copilot AI requested a review from tayyebi January 7, 2026 08:43
@tayyebi tayyebi marked this pull request as ready for review January 7, 2026 11:21
@tayyebi tayyebi merged commit 08faecc into main Jan 7, 2026
@tayyebi tayyebi deleted the copilot/remove-refund-endpoints branch January 7, 2026 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants