Fix sendless statuses
| @@ -152,7 +152,7 @@ router.post('/status', jsonParser, async function (request, response) { | ||
| 152 | 152 | |
| 153 | 153 | if (!modelsReply.ok) { |
| 154 | 154 | console.log('Models endpoint is offline.'); |
| 155 | 155 | return response.statussendStatus(400); |
| 156 | 156 | } |
| 157 | 157 | |
| 158 | 158 | /** @type {any} */ |
| @@ -173,7 +173,7 @@ router.post('/status', jsonParser, async function (request, response) { | ||
| 173 | 173 | |
| 174 | 174 | if (!Array.isArray(data.data)) { |
| 175 | 175 | console.log('Models response is not an array.'); |
| 176 | 176 | return response.statussendStatus(400); |
| 177 | 177 | } |
| 178 | 178 | |
| 179 | 179 | const modelIds = data.data.map(x => x.id); |
| @@ -224,7 +224,7 @@ router.post('/status', jsonParser, async function (request, response) { | ||
| 224 | 224 | return response.send({ result, data: data.data }); |
| 225 | 225 | } catch (error) { |
| 226 | 226 | console.error(error); |
| 227 | 227 | return response.statussendStatus(500); |
| 228 | 228 | } |
| 229 | 229 | }); |
| 230 | 230 | |
| @@ -244,7 +244,7 @@ router.post('/props', jsonParser, async function (request, response) { | ||
| 244 | 244 | const propsReply = await fetch(propsUrl, args); |
| 245 | 245 | |
| 246 | 246 | if (!propsReply.ok) { |
| 247 | 247 | return response.statussendStatus(400); |
| 248 | 248 | } |
| 249 | 249 | |
| 250 | 250 | /** @type {any} */ |
| @@ -258,7 +258,7 @@ router.post('/props', jsonParser, async function (request, response) { | ||
| 258 | 258 | return response.send(props); |
| 259 | 259 | } catch (error) { |
| 260 | 260 | console.error(error); |
| 261 | 261 | return response.statussendStatus(500); |
| 262 | 262 | } |
| 263 | 263 | }); |
| 264 | 264 | |
| @@ -450,7 +450,7 @@ ollama.post('/download', jsonParser, async function (request, response) { | ||
| 450 | 450 | return response.send({ ok: true }); |
| 451 | 451 | } catch (error) { |
| 452 | 452 | console.error(error); |
| 453 | 453 | return response.statussendStatus(500); |
| 454 | 454 | } |
| 455 | 455 | }); |
| 456 | 456 | |
| @@ -493,7 +493,7 @@ ollama.post('/caption-image', jsonParser, async function (request, response) { | ||
| 493 | 493 | return response.send({ caption }); |
| 494 | 494 | } catch (error) { |
| 495 | 495 | console.error(error); |
| 496 | 496 | return response.statussendStatus(500); |
| 497 | 497 | } |
| 498 | 498 | }); |
| 499 | 499 | |
| @@ -540,7 +540,7 @@ llamacpp.post('/caption-image', jsonParser, async function (request, response) { | ||
| 540 | 540 | |
| 541 | 541 | } catch (error) { |
| 542 | 542 | console.error(error); |
| 543 | 543 | return response.statussendStatus(500); |
| 544 | 544 | } |
| 545 | 545 | }); |
| 546 | 546 | |
| @@ -569,7 +569,7 @@ llamacpp.post('/props', jsonParser, async function (request, response) { | ||
| 569 | 569 | |
| 570 | 570 | } catch (error) { |
| 571 | 571 | console.error(error); |
| 572 | 572 | return response.statussendStatus(500); |
| 573 | 573 | } |
| 574 | 574 | }); |
| 575 | 575 | |
| @@ -619,7 +619,7 @@ llamacpp.post('/slots', jsonParser, async function (request, response) { | ||
| 619 | 619 | |
| 620 | 620 | } catch (error) { |
| 621 | 621 | console.error(error); |
| 622 | 622 | return response.statussendStatus(500); |
| 623 | 623 | } |
| 624 | 624 | }); |
| 625 | 625 | |
| @@ -665,7 +665,7 @@ tabby.post('/download', jsonParser, async function (request, response) { | ||
| 665 | 665 | return response.send({ ok: true }); |
| 666 | 666 | } catch (error) { |
| 667 | 667 | console.error(error); |
| 668 | 668 | return response.statussendStatus(500); |
| 669 | 669 | } |
| 670 | 670 | }); |
| 671 | 671 | |