Skip to content

Commit 821e4e7

Browse files
committed
Adjust return codes
1 parent c1922c2 commit 821e4e7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/benchkit-backend/src/workload.router.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export default function WorkloadRouter (executeWorkload, baseRoute) {
1010
router.put('/', (req, res) => {
1111
validate(req.body)
1212
.then(executeWorkload)
13-
.then(() => res.end())
13+
.then(() => res.status(StatusCodes.NO_CONTENT).end())
1414
.catch(ErrorHandler(res))
1515
})
1616

@@ -28,7 +28,7 @@ export default function WorkloadRouter (executeWorkload, baseRoute) {
2828
Promise.resolve(req.params.id)
2929
.then(store.get)
3030
.then(executeWorkload)
31-
.then(() => res.end())
31+
.then(() => res.status(StatusCodes.NO_CONTENT).end())
3232
.catch(ErrorHandler(res))
3333
})
3434

@@ -42,7 +42,7 @@ export default function WorkloadRouter (executeWorkload, baseRoute) {
4242
router.delete('/:id', (req, res) => {
4343
Promise.resolve(req.params.id)
4444
.then(store.delete)
45-
.then(() => res.end())
45+
.then(() => res.status(StatusCodes.NO_CONTENT).end())
4646
.catch(ErrorHandler(res))
4747
})
4848

0 commit comments

Comments
 (0)