From 1665c7efec978861c3d9a3a3245c899f58448e10 Mon Sep 17 00:00:00 2001 From: Tsu-ba-me Date: Thu, 29 Jun 2023 04:41:28 -0400 Subject: [PATCH] fix(striker-ui-api): correct response status code in create ups, fence --- striker-ui-api/src/lib/request_handlers/fence/createFence.ts | 2 +- striker-ui-api/src/lib/request_handlers/ups/createUps.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/striker-ui-api/src/lib/request_handlers/fence/createFence.ts b/striker-ui-api/src/lib/request_handlers/fence/createFence.ts index 108224d4..02766bf8 100644 --- a/striker-ui-api/src/lib/request_handlers/fence/createFence.ts +++ b/striker-ui-api/src/lib/request_handlers/fence/createFence.ts @@ -132,7 +132,7 @@ export const createFence: RequestHandler< return response.status(500).send(); } - const scode = rUuid ? 201 : 200; + const scode = rUuid ? 200 : 201; return response.status(scode).send(); }; diff --git a/striker-ui-api/src/lib/request_handlers/ups/createUps.ts b/striker-ui-api/src/lib/request_handlers/ups/createUps.ts index 7d37b351..88ef8d04 100644 --- a/striker-ui-api/src/lib/request_handlers/ups/createUps.ts +++ b/striker-ui-api/src/lib/request_handlers/ups/createUps.ts @@ -80,7 +80,7 @@ export const createUps: RequestHandler< return response.status(500).send(); } - const scode = rUuid ? 201 : 200; + const scode = rUuid ? 200 : 201; return response.status(scode).send(); };