File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed
Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -9,21 +9,20 @@ const questionGetEndpoint = [
99 message: "Enter the endpoint of your {{ spec .title | caseUcfirst }} server",
1010 default: "http://localhost/v1",
1111 async validate(value) {
12- if(!value) {
13- return ' Please provide valid endpoint' ;
12+ if (!value) {
13+ return " Please enter a valid endpoint." ;
1414 }
1515 let client = new Client().setEndpoint(value);
1616 try {
17- let response = await client.call('GET ', '/health/version');
18- if(response.version) {
17+ let response = await client.call('get ', '/health/version');
18+ if (response.version) {
1919 return true;
2020 } else {
21- return 'Not a valid endpoint or Appwrite server is not running as expected' ;
21+ throw new Error() ;
2222 }
2323 } catch (error) {
24- return 'Not a valid endpoint or Appwrite server is not running as expected' ;
24+ return "Invalid endpoint or your Appwrite server is not running as expected." ;
2525 }
26- return true;
2726 }
2827 }
2928]
You can’t perform that action at this time.
0 commit comments