Fix service ID, reject invalid service IDs
This commit is contained in:
parent
9b86bca643
commit
781a7ce0ec
@ -10,7 +10,7 @@ import FormInlineButton from '../../../misc/FormInlineButton';
|
||||
import Logo from './logos/datarhei.svg';
|
||||
import Select from '../../../misc/Select';
|
||||
|
||||
const id = 'datarhei_core';
|
||||
const id = 'datarheicore';
|
||||
const name = 'datarhei Core';
|
||||
const version = '1.0';
|
||||
const stream_key_link_rtmp = 'https://docs.datarhei.com/restreamer/knowledge-base/manual/system-settings/rtmp';
|
||||
|
||||
@ -34,6 +34,11 @@ class Registry {
|
||||
}
|
||||
|
||||
Register(service) {
|
||||
if (service.id.match(/[^0-9a-z]/)) {
|
||||
console.warn(`the service.id "${service.id}" is invalid. only [0-9a-z] is allowed.`);
|
||||
return;
|
||||
}
|
||||
|
||||
this.services.set(service.id, service);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user