Remove non alphanumeric from names when creating extensions

This commit is contained in:
Christopher Cookman 2025-01-25 12:37:13 -07:00
parent 1c41dff700
commit 65dd44fd43

View file

@ -69,7 +69,7 @@ class FreepbxManager {
async addExtension(ext, name) {
ext = String(ext);
name = String(name);
name = name.replace(/[^a-zA-Z0-9\s]/g, '');
const query = gql`
mutation addExtension($ext: ID!, $name: String!, $vmPassword: String!) {
addExtension(input: {