Blame view

src/main/webapp/js/kawafile.js 906 Bytes
353d9d4f   Zak   désactivation des...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
  var debtsOfUser = [];
  
  function getDebtsOfUser(username){
      var url = "/api/userDebts"+username;
      
      $.getJson(url,function(d){
              debtsOfUser = d;
      });
  }
  
  function updateDebtOfUser(){
          
      var url ="/api/addDette/";
      
      
      
      
      var user = $("#username").val();
      var dette = $("#sommeDette").val();
      
      var requestData = {
          'username':user,
          'sommeDette':dette
      };
      
  
       
      
  //    var dette = {
  //         username:$("#username").val(),
  //        sommeDette : $("#sommeDette").val()       
  //    };
  //    console.log(dette);
  //    var url ="/api/addDette/";
  //    
      $.ajax({
          url:url,
          method:"POST",
          data:requestData       
      }).done(function(d){
          alert("Ok");
      }).success(function(d){
          console.log(d);
       });
  //        
  }
  
  
  (function(){
      'use strict';
      
      
      
      
      
  })();