mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
done
This commit is contained in:
@@ -26,7 +26,8 @@ export async function mandrillApiRequest(this: IHookFunctions | IExecuteFunction
|
||||
uri: `https://${endpoint}${resource}${action}.json`,
|
||||
body: data,
|
||||
json: true
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
try {
|
||||
return await this.helpers.request!(options);
|
||||
@@ -67,3 +68,33 @@ export async function mandrillApiRequest(this: IHookFunctions | IExecuteFunction
|
||||
}
|
||||
return toEmailArray
|
||||
}
|
||||
|
||||
export function getGoogleAnalyticsDomainsArray(string: String): Array<any> {
|
||||
let array = []
|
||||
if (string.split(',').length > 0) {
|
||||
array = string.split(',')
|
||||
} else {
|
||||
array = [string]
|
||||
}
|
||||
return array
|
||||
}
|
||||
|
||||
export function getTags(string: String): Array<any> {
|
||||
let array = []
|
||||
if (string.split(',').length > 0) {
|
||||
array = string.split(',')
|
||||
} else {
|
||||
array = [string]
|
||||
}
|
||||
return array
|
||||
}
|
||||
|
||||
export function validateJSON(json: any): any {
|
||||
let result
|
||||
try {
|
||||
result = JSON.parse(json)
|
||||
} catch (exception) {
|
||||
result = []
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user