UNPKG

node-uglifier-es

Version:

Fully auto merging and uglifying a whole NodeJs project into one file with external files option. Recompiled from Zsolt Istvan Szabo's work with uglify-es instead of uglify-js-harmony.

30 lines (27 loc) 708 B
'use strict'; // Config HTTP Error Handling angular.module('users').config(['$httpProvider', function($httpProvider) { // Set the httpProvider "not authorized" interceptor $httpProvider.interceptors.push(['$q', '$location', 'Authentication', function($q, $location, Authentication) { return { responseError: function(rejection) { switch (rejection.status) { case 401: // Deauthenticate the global user Authentication.user = null; // Redirect to signin page $location.path('signin'); break; case 403: // Add unauthorized behaviour break; } return $q.reject(rejection); } }; } ]); } ]);