Subversion Repositories SmartDukaan

Rev

Rev 13560 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 13560 Rev 13563
Line 1... Line 1...
1
angular.module('starter.services', [])
1
angular.module('starter.services', [])
2
.value('apihost',"http://dtrdashboard.saholic.com/")
2
.value('apihost',"http://api.profittill.com/")
-
 
3
.factory('UserAction',function($resource,apihost){
-
 
4
    return $resource(apihost+"/user_actions/update/:user_id/:store_product_id/:action",
-
 
5
        {callback: "JSON_CALLBACK"} ,
-
 
6
        { like: {
-
 
7
                method: "JSONP",
-
 
8
            }           
-
 
9
        }
-
 
10
    )})
-
 
11
.factory('RemAction',function($resource,apihost){
-
 
12
    return $resource(apihost+"/user_actions/rem/:user_id/:store_product_id/:action",
-
 
13
        {callback: "JSON_CALLBACK"} ,
-
 
14
        { rem: {
-
 
15
                method: "JSONP",
-
 
16
            }               
-
 
17
        }
-
 
18
    )})
-
 
19
.factory('Myactions', function($resource,apihost) {
-
 
20
    return $resource(apihost+"/user_actions/by/:user_id",
-
 
21
        {callback: "JSON_CALLBACK"} , 
-
 
22
        { all: {
-
 
23
            method: "JSONP",
-
 
24
           }
-
 
25
        }
-
 
26
    )})  
3
.factory('Categories', function($resource,apihost) {
27
.factory('Categories', function($resource,apihost) {
4
  return $resource(apihost+"/categories/?user_id=:me",
28
  return $resource(apihost+"/categories/?user_id=:me",
5
      {callback: "JSON_CALLBACK"} , 
29
      {callback: "JSON_CALLBACK"} , 
6
      { all: {
30
      { all: {
7
          method: "JSONP",
31
          method: "JSONP",