mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-14 20:03:52 +00:00
Revert http test (#1257)
* Revert "refactor: allow messages not starting with http" This reverts commit887e5c448e. * Revert "refactor: allow messages not starting with http" This reverts commit6ce275da7a.
This commit is contained in:
committed by
GitHub
parent
2d53323f60
commit
0500368982
@@ -128,6 +128,7 @@ describe('parseHttp()', () => {
|
||||
{ id: '1', cycle: 'onLoad', message: 'http://', enabled: true }, // OK
|
||||
{}, // no data
|
||||
{ id: '2', cycle: 'onStart', enabled: true }, // no message
|
||||
{ id: '3', cycle: 'onLoad', message: '/test', enabled: true }, // doesnt start with http
|
||||
],
|
||||
} as HttpSettings;
|
||||
const result = parseHttp({ http }, errorEmitter);
|
||||
|
||||
@@ -222,7 +222,11 @@ export function sanitiseHttpSubscriptions(subscriptions?: HttpSubscription[]): H
|
||||
|
||||
return subscriptions.filter(
|
||||
({ id, cycle, message, enabled }) =>
|
||||
typeof id === 'string' && isOntimeCycle(cycle) && typeof message === 'string' && typeof enabled === 'boolean',
|
||||
typeof id === 'string' &&
|
||||
isOntimeCycle(cycle) &&
|
||||
typeof message === 'string' &&
|
||||
message.startsWith('http://') &&
|
||||
typeof enabled === 'boolean',
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user