Commit ca6a6f98 authored by Vladislav Rykov's avatar Vladislav Rykov
Browse files

ajax api (post,get)<->(POST,GET)

parent 741f3a7b
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
function remove_alert(id, devid) { function remove_alert(id, devid) {
$.ajax({ $.ajax({
url:"/administration/{{ user }}/application/{{ app[1] }}/delete-alert?id="+id+"&devid="+devid, url:"/administration/{{ user }}/application/{{ app[1] }}/delete-alert?id="+id+"&devid="+devid,
type:"get", type:"GET",
success: function() { success: function() {
location.reload(); location.reload();
} }
......
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
function remove_automation(id, devid) { function remove_automation(id, devid) {
$.ajax({ $.ajax({
url:"/administration/{{ user }}/application/{{ app[1] }}/delete-automation?id="+id+"&devid="+devid, url:"/administration/{{ user }}/application/{{ app[1] }}/delete-automation?id="+id+"&devid="+devid,
type:"get", type:"GET",
success: function() { success: function() {
location.reload(); location.reload();
} }
......
...@@ -93,7 +93,7 @@ ...@@ -93,7 +93,7 @@
function onsub() { function onsub() {
$.ajax({ $.ajax({
url:"/administration/{{ user }}/application/{{ app[1] }}/device/{{ dev[1] }}/configure", url:"/administration/{{ user }}/application/{{ app[1] }}/device/{{ dev[1] }}/configure",
type:"post", type:"POST",
data:$("#confform").serialize(), data:$("#confform").serialize(),
success: function() { success: function() {
location.reload(); location.reload();
...@@ -103,7 +103,7 @@ ...@@ -103,7 +103,7 @@
function remove_configuration(b64) { function remove_configuration(b64) {
$.ajax({ $.ajax({
url:"/administration/{{ user }}/application/{{ app[1] }}/device/{{ dev[1] }}/remove-configuration?conf="+b64, url:"/administration/{{ user }}/application/{{ app[1] }}/device/{{ dev[1] }}/remove-configuration?conf="+b64,
type:"get", type:"GET",
success: function() { success: function() {
location.reload(); location.reload();
} }
......
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
function remove_alert(id, devid) { function remove_alert(id, devid) {
$.ajax({ $.ajax({
url:"/application/{{ app[1] }}/delete-alert?id="+id+"&devid="+devid, url:"/application/{{ app[1] }}/delete-alert?id="+id+"&devid="+devid,
type:"get", type:"GET",
success: function() { success: function() {
location.reload(); location.reload();
} }
......
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
function remove_automation(id, devid) { function remove_automation(id, devid) {
$.ajax({ $.ajax({
url:"/application/{{ app[1] }}/delete-automation?id="+id+"&devid="+devid, url:"/application/{{ app[1] }}/delete-automation?id="+id+"&devid="+devid,
type:"get", type:"GET",
success: function() { success: function() {
location.reload(); location.reload();
} }
......
...@@ -86,7 +86,7 @@ ...@@ -86,7 +86,7 @@
function onsub() { function onsub() {
$.ajax({ $.ajax({
url:"/application/{{ app[1] }}/device/{{ dev[1] }}/configure", url:"/application/{{ app[1] }}/device/{{ dev[1] }}/configure",
type:"post", type:"POST",
data:$("#confform").serialize(), data:$("#confform").serialize(),
success: function() { success: function() {
location.reload(); location.reload();
...@@ -96,7 +96,7 @@ ...@@ -96,7 +96,7 @@
function remove_configuration(b64) { function remove_configuration(b64) {
$.ajax({ $.ajax({
url:"/application/{{ app[1] }}/device/{{ dev[1] }}/remove-configuration?conf="+b64, url:"/application/{{ app[1] }}/device/{{ dev[1] }}/remove-configuration?conf="+b64,
type:"get", type:"GET",
success: function() { success: function() {
location.reload(); location.reload();
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment