@@ -6,15 +6,20 @@ class Form{
6
6
constructor ( appconf , formconf ) {
7
7
this . appconf = appconf
8
8
this . formName = formconf . formName
9
+ this . endpointURL = 'https://creator.zoho.com/api/' ;
9
10
}
10
11
11
12
add ( formdata )
12
13
{
13
14
return this . post ( formdata )
14
15
}
16
+ changeEndPointURL ( url )
17
+ {
18
+ this . endpointURL = url ;
19
+ }
15
20
update ( formdata , criteria )
16
21
{
17
- this . endpoint = 'https://creator.zoho.com/api/' + this . appconf . ownername + '/json/'
22
+ this . endpoint = this . endpointURL + this . appconf . ownername + '/json/'
18
23
+ this . appconf . appName + '/form/' + this . formName + '/record/update'
19
24
20
25
formdata [ 'authtoken' ] = this . appconf . authtoken
@@ -73,7 +78,7 @@ class Form{
73
78
}
74
79
post ( formdata )
75
80
{
76
- this . endpoint = 'https://creator.zoho.com/api/' + this . appconf . ownername + '/json/'
81
+ this . endpoint = this . endpointURL + this . appconf . ownername + '/json/'
77
82
+ this . appconf . appName + '/form/' + this . formName + '/record/add'
78
83
formdata [ 'authtoken' ] = this . appconf . authtoken
79
84
formdata [ 'scope' ] = 'creatorapi'
@@ -126,7 +131,7 @@ class Form{
126
131
}
127
132
delete ( criteria )
128
133
{
129
- this . endpoint = 'https://creator.zoho.com/api/' + this . appconf . ownername + '/json/'
134
+ this . endpoint = this . endpointURL + this . appconf . ownername + '/json/'
130
135
+ this . appconf . appName + '/form/' + this . formName + '/record/delete'
131
136
var formdata = { }
132
137
formdata [ 'authtoken' ] = this . appconf . authtoken
0 commit comments