Skip to content
This repository was archived by the owner on Jul 12, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cmd/adminapi/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ func realMain(ctx context.Context) error {

issueapiController := issueapi.New(ctx, cfg, db, limiterStore, h)
sub.Handle("/issue", issueapiController.HandleIssue()).Methods("POST")
sub.Handle("/batch-issue", issueapiController.HandleBatchIssue()).Methods("POST")

codesController := codes.NewAPI(ctx, cfg, db, h)
sub.Handle("/checkcodestatus", codesController.HandleCheckCodeStatus()).Methods("POST")
Expand Down
2 changes: 1 addition & 1 deletion internal/routes/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,6 @@ func Server(
// API for creating new verification codes. Called via AJAX.
issueapiController := issueapi.New(ctx, cfg, db, limiterStore, h)
sub.Handle("/issue", issueapiController.HandleIssue()).Methods("POST")
sub.Handle("/bulk-issue", issueapiController.HandleBulkIssue()).Methods("GET")
sub.Handle("/batch-issue", issueapiController.HandleBatchIssue()).Methods("POST")

codesController := codes.NewServer(ctx, cfg, db, h)
Expand Down Expand Up @@ -336,6 +335,7 @@ func Server(
// codesRoutes are the routes for checking codes.
func codesRoutes(r *mux.Router, c *codes.Controller) {
r.Handle("/issue", c.HandleIssue()).Methods("GET")
r.Handle("/bulk-issue", c.HandleBulkIssue()).Methods("GET")
r.Handle("/status", c.HandleIndex()).Methods("GET")
r.Handle("/{uuid}", c.HandleShow()).Methods("GET")
r.Handle("/{uuid}/expire", c.HandleExpirePage()).Methods("PATCH")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package issueapi
package codes

import (
"net/http"
Expand Down
1 change: 1 addition & 0 deletions pkg/testsuite/integration.go
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,7 @@ func (s *IntegrationSuite) newAdminAPIServer(ctx context.Context, tb testing.TB)

issueapiController := issueapi.New(ctx, &s.cfg.AdminAPISrvConfig, s.db, limiterStore, h)
sub.Handle("/issue", issueapiController.HandleIssue()).Methods("POST")
sub.Handle("/batch-issue", issueapiController.HandleBatchIssue()).Methods("POST")

codesController := codes.NewAPI(ctx, &s.cfg.AdminAPISrvConfig, s.db, h)
sub.Handle("/checkcodestatus", codesController.HandleCheckCodeStatus()).Methods("POST")
Expand Down