-
Notifications
You must be signed in to change notification settings - Fork 0
/
bidService.js
26 lines (26 loc) · 1.04 KB
/
bidService.js
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
angular.module('app')
.factory('BidService', function ($http) {
return {
savePost: function (postData) {
return $http.post(appSettings.serviceURL + '/api/post',postData);
},
getAllPosts: function () {
return $http.get(appSettings.serviceURL + '/api/post');
},
getMyPosts: function () {
return $http.get(appSettings.serviceURL + '/api/myposts');
},
getPostbyId:function(id){
return $http.get(appSettings.serviceURL+'/api/post/'+id);
},
saveBid:function(postId,bidData){
return $http.post(appSettings.serviceURL+'/api/'+postId+'/bid',bidData)
},
getBidsbyPostId:function(id){
return $http.get(appSettings.serviceURL+'/api/bids/'+id);
},
getIsMyPost:function(id){
return $http.get(appSettings.serviceURL+'/api/isMyPost/'+id);
}
};
});