mirror of
https://github.com/semaphoreui/semaphore.git
synced 2024-11-23 20:35:24 +01:00
Fixed API Call. Close #142
This commit is contained in:
parent
b4cab16fda
commit
d36760c28c
@ -42,7 +42,7 @@ define(function () {
|
||||
templateUrl: '/tpl/projects/environment/add.html',
|
||||
scope: scope
|
||||
}).result.then(function (env) {
|
||||
$http.post(Project.getURL() + '/environment', env)
|
||||
$http.post(Project.getURL() + '/environment', env.environment)
|
||||
.success(function () {
|
||||
$scope.reload();
|
||||
}).error(function (_, status) {
|
||||
|
@ -41,7 +41,7 @@ define(function () {
|
||||
templateUrl: '/tpl/projects/inventory/add.html',
|
||||
scope: scope
|
||||
}).result.then(function (inventory) {
|
||||
$http.post(Project.getURL() + '/inventory', inventory)
|
||||
$http.post(Project.getURL() + '/inventory', inventory.inventory)
|
||||
.success(function () {
|
||||
$scope.reload();
|
||||
}).error(function (_, status) {
|
||||
|
@ -36,7 +36,7 @@ define(function () {
|
||||
$modal.open({
|
||||
templateUrl: '/tpl/projects/keys/add.html'
|
||||
}).result.then(function (key) {
|
||||
$http.post(Project.getURL() + '/keys', key).success(function () {
|
||||
$http.post(Project.getURL() + '/keys', key.key).success(function () {
|
||||
$scope.reload();
|
||||
}).error(function (_, status) {
|
||||
swal('error', 'could not add key:' + status, 'error');
|
||||
|
@ -74,7 +74,7 @@ define(function () {
|
||||
templateUrl: '/tpl/projects/repositories/add.html',
|
||||
scope: scope
|
||||
}).result.then(function (repo) {
|
||||
$http.post(Project.getURL() + '/repositories', repo)
|
||||
$http.post(Project.getURL() + '/repositories', repo.repo)
|
||||
.success(function () {
|
||||
$scope.reload();
|
||||
}).error(function (_, status) {
|
||||
|
Loading…
Reference in New Issue
Block a user