summary refs log tree commit diff
diff options
context:
space:
mode:
authorPuyodead1 <puyodead@proton.me>2023-03-25 12:45:10 -0400
committerPuyodead1 <puyodead@proton.me>2023-04-13 15:32:05 -0400
commita1d8869271141df7301b654704eee3ff82f703c3 (patch)
tree93bbeb7cf5996cbdcd39b051f780518f4ea61584
parentoapi: policies (diff)
downloadserver-a1d8869271141df7301b654704eee3ff82f703c3.tar.xz
oapi: readstates
-rw-r--r--assets/openapi.json12
-rw-r--r--src/api/routes/read-states/ack-bulk.ts10
2 files changed, 20 insertions, 2 deletions
diff --git a/assets/openapi.json b/assets/openapi.json
index d2953a04..275113ef 100644
--- a/assets/openapi.json
+++ b/assets/openapi.json
@@ -7977,8 +7977,18 @@
                     }
                 },
                 "responses": {
-                    "default": {
+                    "204": {
                         "description": "No description available"
+                    },
+                    "400": {
+                        "description": "",
+                        "content": {
+                            "application/json": {
+                                "schema": {
+                                    "$ref": "#/components/schemas/APIErrorResponse"
+                                }
+                            }
+                        }
                     }
                 },
                 "tags": [
diff --git a/src/api/routes/read-states/ack-bulk.ts b/src/api/routes/read-states/ack-bulk.ts
index bca2001c..3ee25d1a 100644
--- a/src/api/routes/read-states/ack-bulk.ts
+++ b/src/api/routes/read-states/ack-bulk.ts
@@ -23,7 +23,15 @@ const router = Router();
 
 router.post(
 	"/",
-	route({ requestBody: "AckBulkSchema" }),
+	route({
+		requestBody: "AckBulkSchema",
+		responses: {
+			204: {},
+			400: {
+				body: "APIErrorResponse",
+			},
+		},
+	}),
 	async (req: Request, res: Response) => {
 		const body = req.body as AckBulkSchema;