Skip to content

Commit

Permalink
refactor: rename GenerateLink to adminGenerateLink (#1320)
Browse files Browse the repository at this point in the history
Follows the pattern where all admin handlers are named `adminXYZ`.
  • Loading branch information
hf authored Nov 27, 2023
1 parent fd0e543 commit 5ea3448
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion internal/api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ func NewAPIWithVersion(ctx context.Context, globalConfig *conf.GlobalConfigurati
})
})

r.Post("/generate_link", api.GenerateLink)
r.Post("/generate_link", api.adminGenerateLink)

r.Route("/sso", func(r *router) {
r.Route("/providers", func(r *router) {
Expand Down
2 changes: 1 addition & 1 deletion internal/api/mail.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ type GenerateLinkResponse struct {
RedirectTo string `json:"redirect_to"`
}

func (a *API) GenerateLink(w http.ResponseWriter, r *http.Request) error {
func (a *API) adminGenerateLink(w http.ResponseWriter, r *http.Request) error {
ctx := r.Context()
db := a.db.WithContext(ctx)
config := a.config
Expand Down

0 comments on commit 5ea3448

Please sign in to comment.