summary refs log tree commit diff
path: root/src/api/routes/users/@me/mfa/codes.ts
diff options
context:
space:
mode:
authorPuyodead1 <puyodead@proton.me>2023-03-25 16:09:04 -0400
committerPuyodead1 <puyodead@proton.me>2023-04-13 15:38:52 -0400
commit1ce7879ee85ea5bb5efaff3cf950e65513098d3c (patch)
tree825ae4c842b096736221668e59fc4c815998aec3 /src/api/routes/users/@me/mfa/codes.ts
parentoapi: stickers (diff)
downloadserver-1ce7879ee85ea5bb5efaff3cf950e65513098d3c.tar.xz
oapi: users progress
Diffstat (limited to 'src/api/routes/users/@me/mfa/codes.ts')
-rw-r--r--src/api/routes/users/@me/mfa/codes.ts18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/api/routes/users/@me/mfa/codes.ts b/src/api/routes/users/@me/mfa/codes.ts
index 178e25c9..7a60522a 100644
--- a/src/api/routes/users/@me/mfa/codes.ts
+++ b/src/api/routes/users/@me/mfa/codes.ts
@@ -33,7 +33,23 @@ const router = Router();
 
 router.post(
 	"/",
-	route({ requestBody: "MfaCodesSchema" }),
+	route({
+		requestBody: "MfaCodesSchema",
+		deprecated: true,
+		description:
+			"This route is replaced with users/@me/mfa/codes-verification in newer clients",
+		responses: {
+			200: {
+				body: "UserBackupCodesResponse",
+			},
+			400: {
+				body: "APIErrorResponse",
+			},
+			404: {
+				body: "APIErrorResponse",
+			},
+		},
+	}),
 	async (req: Request, res: Response) => {
 		const { password, regenerate } = req.body as MfaCodesSchema;