51 lines
1.2 KiB
JavaScript
51 lines
1.2 KiB
JavaScript
import ngModule from '../module';
|
|
|
|
index.$inject = ['mgIndex'];
|
|
function index(mgIndex) {
|
|
return Object.assign({}, mgIndex, {
|
|
init: 'index.filter={page: 1, size: 5}'
|
|
});
|
|
}
|
|
ngModule.factory('vnIndex', index);
|
|
|
|
nonAuto.$inject = ['mgIndex'];
|
|
function nonAuto(mgIndex) {
|
|
return Object.assign({}, mgIndex, {
|
|
auto: false
|
|
});
|
|
}
|
|
ngModule.factory('vnIndexNonAuto', nonAuto);
|
|
|
|
successFactoryCreate.$inject = ['mgSuccessFactoryCreate'];
|
|
function successFactoryCreate(create) {
|
|
return Object.assign({}, create, {
|
|
back: undefined
|
|
});
|
|
}
|
|
ngModule.factory('vnSuccessFactoryCreate', successFactoryCreate);
|
|
|
|
put.$inject = ['mgPut'];
|
|
function put(mgPut) {
|
|
return Object.assign({}, mgPut, {
|
|
success: 'vnSuccessFactoryCreate'
|
|
});
|
|
}
|
|
ngModule.factory('vnPut', put);
|
|
|
|
patch.$inject = ['mgPatch'];
|
|
function patch(mgPatch) {
|
|
return Object.assign({}, mgPatch, {
|
|
success: 'vnSuccessFactoryCreate'
|
|
});
|
|
}
|
|
ngModule.factory('vnPatch', patch);
|
|
|
|
post.$inject = ['mgCreate'];
|
|
function post(mgCreate) {
|
|
return Object.assign({}, mgCreate, {
|
|
as: 'post',
|
|
success: 'vnSuccessFactoryCreate'
|
|
});
|
|
}
|
|
ngModule.factory('vnPost', post);
|