diff --git a/src/api/routes/auth/forgot.ts b/src/api/routes/auth/forgot.ts
index 7e1ba65a..80ffb225 100644
--- a/src/api/routes/auth/forgot.ts
+++ b/src/api/routes/auth/forgot.ts
@@ -31,7 +31,7 @@ const router = Router();
router.post(
"/",
route({
- body: "ForgotPasswordSchema",
+ requestBody: "ForgotPasswordSchema",
responses: {
204: {},
400: {
diff --git a/src/api/routes/auth/login.ts b/src/api/routes/auth/login.ts
index 729bd1cb..19a09f81 100644
--- a/src/api/routes/auth/login.ts
+++ b/src/api/routes/auth/login.ts
@@ -37,7 +37,7 @@ export default router;
router.post(
"/",
route({
- body: "LoginSchema",
+ requestBody: "LoginSchema",
responses: {
200: {
body: "TokenResponse",
diff --git a/src/api/routes/auth/mfa/totp.ts b/src/api/routes/auth/mfa/totp.ts
index 0bfc2c52..4df408f9 100644
--- a/src/api/routes/auth/mfa/totp.ts
+++ b/src/api/routes/auth/mfa/totp.ts
@@ -26,7 +26,7 @@ const router = Router();
router.post(
"/",
route({
- body: "TotpSchema",
+ requestBody: "TotpSchema",
responses: {
200: {
body: "TokenResponse",
diff --git a/src/api/routes/auth/mfa/webauthn.ts b/src/api/routes/auth/mfa/webauthn.ts
index e7278047..b58d2944 100644
--- a/src/api/routes/auth/mfa/webauthn.ts
+++ b/src/api/routes/auth/mfa/webauthn.ts
@@ -42,7 +42,7 @@ function toArrayBuffer(buf: Buffer) {
router.post(
"/",
route({
- body: "WebAuthnTotpSchema",
+ requestBody: "WebAuthnTotpSchema",
responses: {
200: { body: "TokenResponse" },
400: { body: "APIErrorResponse" },
diff --git a/src/api/routes/auth/register.ts b/src/api/routes/auth/register.ts
index 70acedcd..73a28fed 100644
--- a/src/api/routes/auth/register.ts
+++ b/src/api/routes/auth/register.ts
@@ -16,25 +16,25 @@
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
-import { Request, Response, Router } from "express";
+import {
+ IPAnalysis,
+ getIpAdress,
+ isProxy,
+ route,
+ verifyCaptcha,
+} from "@spacebar/api";
import {
Config,
- generateToken,
- Invite,
FieldErrors,
- User,
- adjustEmail,
+ Invite,
RegisterSchema,
+ User,
ValidRegistrationToken,
+ adjustEmail,
+ generateToken,
} from "@spacebar/util";
-import {
- route,
- getIpAdress,
- IPAnalysis,
- isProxy,
- verifyCaptcha,
-} from "@spacebar/api";
import bcrypt from "bcrypt";
+import { Request, Response, Router } from "express";
import { HTTPError } from "lambert-server";
import { MoreThan } from "typeorm";
@@ -43,7 +43,7 @@ const router: Router = Router();
router.post(
"/",
route({
- body: "RegisterSchema",
+ requestBody: "RegisterSchema",
responses: {
200: { body: "TokenResponse" },
400: { body: "APIErrorOrCaptchaResponse" },
diff --git a/src/api/routes/auth/reset.ts b/src/api/routes/auth/reset.ts
index 9c17d2b0..cbfa4935 100644
--- a/src/api/routes/auth/reset.ts
+++ b/src/api/routes/auth/reset.ts
@@ -35,7 +35,7 @@ const router = Router();
router.post(
"/",
route({
- body: "PasswordResetSchema",
+ requestBody: "PasswordResetSchema",
responses: {
200: {
body: "TokenResponse",
diff --git a/src/api/routes/auth/verify/index.ts b/src/api/routes/auth/verify/index.ts
index da92f256..a98c17fa 100644
--- a/src/api/routes/auth/verify/index.ts
+++ b/src/api/routes/auth/verify/index.ts
@@ -41,7 +41,7 @@ async function getToken(user: User) {
router.post(
"/",
route({
- body: "VerifyEmailSchema",
+ requestBody: "VerifyEmailSchema",
responses: {
200: {
body: "TokenResponse",
diff --git a/src/api/routes/auth/verify/view-backup-codes-challenge.ts b/src/api/routes/auth/verify/view-backup-codes-challenge.ts
index 63158d9d..5407de82 100644
--- a/src/api/routes/auth/verify/view-backup-codes-challenge.ts
+++ b/src/api/routes/auth/verify/view-backup-codes-challenge.ts
@@ -25,7 +25,7 @@ const router = Router();
router.post(
"/",
route({
- body: "BackupCodesChallengeSchema",
+ requestBody: "BackupCodesChallengeSchema",
responses: {
200: { body: "BackupCodesChallengeResponse" },
400: { body: "APIErrorResponse" },
|