Small improvements to Msg91-Node

This commit is contained in:
Jan Oberhauser
2019-12-20 16:35:00 -06:00
parent 13b925dab3
commit d169a5617f
2 changed files with 31 additions and 37 deletions

View File

@@ -24,19 +24,15 @@ export async function msg91ApiRequest(this: IHookFunctions | IExecuteFunctions,
if (query === undefined) {
query = {};
}
query.authkey = credentials.authkey as string;
}
query.authkey = credentials.authkey as string;
const options = {
method,
form: body,
qs: query,
uri: `https://api.msg91.com/api/sendhttp.php`,
auth: {
user: '',
pass: '',
},
uri: `https://api.msg91.com/api${endpoint}`,
json: true
};
@@ -61,4 +57,4 @@ export async function msg91ApiRequest(this: IHookFunctions | IExecuteFunctions,
// If that data does not exist for some reason return the actual error
throw error;
}
}
}