1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-30 18:11:47 +00:00

rename api routes

This commit is contained in:
Rokt33r
2015-06-25 23:19:45 +09:00
parent ee139ca36d
commit 1a832c1fc4
2 changed files with 25 additions and 6 deletions

View File

@@ -2,7 +2,7 @@
angular.module('codexen')
.factory('Recipe', function ($http, $auth, apiUrl) {
var findByUser = function (user) {
var url = apiUrl + 'recipes/search'
var url = apiUrl + 'blueprints/search'
return $http.get(url, {
params: {
@@ -12,31 +12,31 @@ angular.module('codexen')
}
var findMine = function (params) {
var url = apiUrl + 'recipes/my'
var url = apiUrl + 'blueprints/my'
return $http.get(url, {params: params})
}
var create = function (params) {
var url = apiUrl + 'recipes/create'
var url = apiUrl + 'blueprints/create'
return $http.post(url, params)
}
var show = function (id, params) {
var url = apiUrl + 'recipes/id/' + id
var url = apiUrl + 'blueprints/id/' + id
return $http.get(url, {params: params})
}
var update = function (id, params) {
var url = apiUrl + 'recipes/id/' + id
var url = apiUrl + 'blueprints/id/' + id
return $http.put(url, params)
}
var destroy = function (id) {
var url = apiUrl + 'recipes/id/' + id
var url = apiUrl + 'blueprints/id/' + id
return $http.delete(url)
}