diff --git a/src/api/routes/auth/generate-registration-tokens.ts b/src/api/routes/auth/generate-registration-tokens.ts
index 723875f8..80fdaed1 100644
--- a/src/api/routes/auth/generate-registration-tokens.ts
+++ b/src/api/routes/auth/generate-registration-tokens.ts
@@ -16,7 +16,7 @@
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
-import { route, random } from "@spacebar/api";
+import { random, route } from "@spacebar/api";
import { Config, ValidRegistrationToken } from "@spacebar/util";
import { Request, Response, Router } from "express";
@@ -25,7 +25,22 @@ export default router;
router.get(
"/",
- route({ right: "OPERATOR" }),
+ route({
+ query: {
+ count: {
+ type: "number",
+ description:
+ "The number of registration tokens to generate. Defaults to 1.",
+ },
+ length: {
+ type: "number",
+ description:
+ "The length of each registration token. Defaults to 255.",
+ },
+ },
+ right: "OPERATOR",
+ responses: { 200: { body: "GenerateRegistrationTokensResponse" } },
+ }),
async (req: Request, res: Response) => {
const count = req.query.count ? parseInt(req.query.count as string) : 1;
const length = req.query.length
|