415
This commit is contained in:
+1
-1
@@ -100,7 +100,7 @@ fastify.get("/settings", async (request, response) => {
|
|||||||
|
|
||||||
fastify.put("/settings", async (request, response) => {
|
fastify.put("/settings", async (request, response) => {
|
||||||
if (request.headers["content-type"] !== "application/octet-stream") {
|
if (request.headers["content-type"] !== "application/octet-stream") {
|
||||||
return response.status(413).send({ error: "Content type must be `application/octet-stream`" });
|
return response.status(415).send({ error: "Content type must be `application/octet-stream`" });
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((request.body as Buffer).byteLength > SIZE_LIMIT) {
|
if ((request.body as Buffer).byteLength > SIZE_LIMIT) {
|
||||||
|
|||||||
Reference in New Issue
Block a user