TestController
struct TestController : APIRouteCollection
The collection of /api/v3/test/*
route endpoints and handler functions for unit
testing and benchmarking purposes.
Note
These endpoints are NOT intended as API for client development.-
Required. Registers routes to the incoming router.
Declaration
Swift
func registerRoutes(_ app: Application) throws
-
getUsersHandler(_:
Asynchronous) -
getRegistrationCodesHandler(_:
Asynchronous) GET /api/v3/test/getregistrationcodes
Returns an array of all stored
RegistrationCode
models. If called in a production environment, the actual codes are sanitized before return.Declaration
Swift
func getRegistrationCodesHandler(_ req: Request) async throws -> [RegistrationCode]
Parameters
req
The incoming
Request
, provided automatically.Return Value
An array of the
RegistrationCoe
models in the databases.