mirror of https://github.com/Chocobozzz/PeerTube
Fix plugin filter test
parent
f7ce623db1
commit
da5f46487f
|
@ -192,7 +192,7 @@ async function register ({ registerHook, registerSetting, settingsManager, stora
|
||||||
registerHook({
|
registerHook({
|
||||||
target: 'filter:api.user.signup.allowed.result',
|
target: 'filter:api.user.signup.allowed.result',
|
||||||
handler: (result, params) => {
|
handler: (result, params) => {
|
||||||
if (params && params.body.email.includes('jma')) {
|
if (params && params.body && params.body.email && params.body.email.includes('jma')) {
|
||||||
return { allowed: false, errorMessage: 'No jma' }
|
return { allowed: false, errorMessage: 'No jma' }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue