added updated code for test env
[it/otf.git] / otf-frontend / server / src / feathers / services / jobs / jobs.hooks.js
index f119833..eec6d19 100644 (file)
@@ -119,7 +119,7 @@ module.exports = {
                        (context) => { console.log("AFTER PERMISSIONS")},\r
                        canExecute(), \r
                        async (context) => {\r
-                               const fullUrl = 'https://localhost/' + context.app.get('base-path') + 'schedule-test';\r
+                               const fullUrl = this.options.app.get('otf').url + context.app.get('base-path') + 'schedule-test';\r
 \r
                                context.data.executorId = context.params.user._id;\r
 \r
@@ -155,7 +155,7 @@ module.exports = {
                        permissions('jobs'),\r
                        canExecute(),\r
                        async function (context) {\r
-                       const fullUrl = 'https://localhost/' + context.app.get('base-path') + 'cancel-test';\r
+                       const fullUrl = this.options.app.get('otf').url + context.app.get('base-path') + 'cancel-test';\r
 \r
                        if (context.id == null || context.params.user._id == null ||\r
                                utils.isValidObjectId(context.id) || utils.isValidObjectId(context.params.user._id)) {\r