1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 09:46:22 +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

@@ -21,6 +21,25 @@ var minifyHtml = require('gulp-minify-html')
var config = require('./build.config.js')
gulp.task('build', function () {
var tpls = gulp.src(['src/browser/main/**/*.html','!src/browser/main/index.html','!src/browser/main/index.inject.html'])
.pipe(templateCache({}))
.pipe(concat('tpls.js'))
.pipe(ngAnnotate())
.pipe(uglify())
.pipe(gulp.dest('build'))
var js = gulp.src(['src/browser/main/**/*.js', 'src/browser/shared/**/*.js'])
.pipe(concat('app.js'))
.pipe(ngAnnotate())
.pipe(uglify())
.pipe(gulp.dest('build'))
var css = gulp.src(['src/browser/main/**/*.css', 'src/browser/shared/**/*.css'])
.pipe(concat('all.css'))
.pipe(minifyCss())
.pipe(gulp.dest('build'))
return merge(tpls, js, css)
})
gulp.task('vendor', function () {
var vendors = config.vendors

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)
}