Fixed apigen command to use update method
diff --git a/views/ngXosLib/apigen/blueprintToNgResource.js b/views/ngXosLib/apigen/blueprintToNgResource.js
index 2a3cde3..21d65e7 100644
--- a/views/ngXosLib/apigen/blueprintToNgResource.js
+++ b/views/ngXosLib/apigen/blueprintToNgResource.js
@@ -70,7 +70,7 @@
fs.readFileAsync(path.join(__dirname, './ngResourceTemplate.handlebars'), 'utf8')
.then((template) => {
handlebarsTemplate = Handlebars.compile(template);
- return fs.readFileAsync(path.join(__dirname, '../../../xos/tests/api/apiary.apib'), 'utf8')
+ return fs.readFileAsync(path.join(__dirname, '../../../apiary.apib'), 'utf8')
})
.then(data => protagonist.parseAsync(data))
.then(result => loopApiDefinitions(result.content))
diff --git a/views/ngXosLib/apigen/ngResourceTemplate.handlebars b/views/ngXosLib/apigen/ngResourceTemplate.handlebars
index 6176633..c1bc8f5 100644
--- a/views/ngXosLib/apigen/ngResourceTemplate.handlebars
+++ b/views/ngXosLib/apigen/ngResourceTemplate.handlebars
@@ -9,7 +9,9 @@
* @description Angular resource to fetch {{param.href}}
**/
.service('{{name}}', function($resource){
- return $resource('{{param.href}}'{{#if param.name}}, { {{param.name}}: '@id' }{{/if}});
+ return $resource('{{param.href}}'{{#if param.name}}, { {{param.name}}: '@id' }, {
+ update: { method: 'PUT' }
+ }{{/if}});
})
{{/each}}
})();
\ No newline at end of file