Skip to content

Commit

Permalink
refactoring: remove unused billing code (getfider#920)
Browse files Browse the repository at this point in the history
  • Loading branch information
goenning authored Mar 20, 2021
1 parent 723cfe1 commit 7c75f0b
Show file tree
Hide file tree
Showing 69 changed files with 60 additions and 2,882 deletions.
2 changes: 1 addition & 1 deletion GUIDELINES.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
- `app/models/dto.<something>`: A simple object used for data transfer between various packages/services. E.g: `dto.NewUserInfo`;
- `app/models/entity.<something>`: An object that is mapped to a database table. E.g: `entity.User`;
- `app/models/cmd.<something>` something that must be done and potentially return some value. E.g.: `cmd.HttpRequest`, `cmd.LogDebug`, `cmd.SendMail`, `cmd.CreateNewUser`;
- `app/models/query.<something>` get some information from somewhere. E.g.: `query.GetUserById`, `query.GetBillingStatus`;
- `app/models/query.<something>` get some information from somewhere. E.g.: `query.GetUserById`, `query.GetAllPosts`;

# UI Development

Expand Down
134 changes: 0 additions & 134 deletions app/actions/billing.go

This file was deleted.

131 changes: 0 additions & 131 deletions app/actions/billing_test.go

This file was deleted.

8 changes: 0 additions & 8 deletions app/cmd/routes.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,14 +159,6 @@ func routes(r *web.Engine) *web.Engine {
ui.Post("/_api/admin/roles/:role/users", handlers.ChangeUserRole())
ui.Put("/_api/admin/users/:userID/block", handlers.BlockUser())
ui.Delete("/_api/admin/users/:userID/block", handlers.UnblockUser())

ui.Use(middlewares.RequireBillingEnabled())

ui.Get("/admin/billing", handlers.BillingPage())
ui.Get("/_api/admin/billing/plans/:countryCode", handlers.GetBillingPlans())
ui.Post("/_api/admin/billing/paymentinfo", handlers.UpdatePaymentInfo())
ui.Post("/_api/admin/billing/subscription/:planID", handlers.BillingSubscribe())
ui.Delete("/_api/admin/billing/subscription/:planID", handlers.CancelBillingSubscription())
}

api := r.Group()
Expand Down
1 change: 0 additions & 1 deletion app/cmd/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import (
"github.com/getfider/fider/app/pkg/log"
"github.com/getfider/fider/app/pkg/web"

_ "github.com/getfider/fider/app/services/billing"
_ "github.com/getfider/fider/app/services/blob/fs"
_ "github.com/getfider/fider/app/services/blob/s3"
_ "github.com/getfider/fider/app/services/blob/sql"
Expand Down
Loading

0 comments on commit 7c75f0b

Please sign in to comment.