Fix the way the rest API is called

- The URL is relative to the base path, so we must prefix it with a /
- The variable name should be different from the function name

Change-Id: I8184cc4ea0446b313a668044aba52ac2535e7430
diff --git a/gr-simple-submit-rules-repo-config/gr-simple-submit-rules-repo-config.js b/gr-simple-submit-rules-repo-config/gr-simple-submit-rules-repo-config.js
index 746e5e2..c9daafe 100644
--- a/gr-simple-submit-rules-repo-config/gr-simple-submit-rules-repo-config.js
+++ b/gr-simple-submit-rules-repo-config/gr-simple-submit-rules-repo-config.js
@@ -32,8 +32,8 @@
         type: Boolean,
         value: true,
       },
-      _pluginRestApi: Object,
-    },
+     _restApi: Object,
+ },
 
     observers: [
       '_handleConfigChanged(_repoConfig.*)',
@@ -87,7 +87,7 @@
     },
 
     _endpointUrl() {
-      return 'projects/' + encodeURIComponent(this.repoName) + '/simple-submit-rules';
+      return '/projects/' + encodeURIComponent(this.repoName) + '/simple-submit-rules';
     },
 
     _handleSaveRepoConfig() {
@@ -110,10 +110,10 @@
     },
 
     _pluginRestApi() {
-      if (this._pluginRestApi === undefined) {
-        this._pluginRestApi = this.plugin.restApi();
+      if (this._restApi === undefined) {
+        this._restApi = this.plugin.restApi();
       }
-      return this._pluginRestApi;
+      return this._restApi;
     },
 
     _getRepoAccess(repoName) {