mirror of
https://github.com/imputnet/cobalt.git
synced 2026-01-09 08:21:24 +00:00
stream/types: move closeResponse to shared
This commit is contained in:
@@ -16,6 +16,11 @@ const serviceHeaders = {
|
||||
}
|
||||
}
|
||||
|
||||
export function closeResponse(res) {
|
||||
if (!res.headersSent) res.sendStatus(500);
|
||||
return res.destroy();
|
||||
}
|
||||
|
||||
export function getHeaders(service) {
|
||||
return { ...defaultHeaders, ...serviceHeaders[service] }
|
||||
}
|
||||
Reference in New Issue
Block a user