const { reject, compose } = require('async');
const { resolve } = require('path');


exports.install = function() {
    	ROUTE('#401',view_401);
    	ROUTE('#403',view_403);
    	ROUTE('#404',view_404);
    	ROUTE('#408',view_408);
};
var smsmodel={sms:"",data:{}};
	 





function view_401(req,res){
	var self=this;
	var model=self.req.url;
	
	if(self.repository.user){
		self.redirect('/api');
	}else{
		self.redirect('/login');
	}
	// if(model=='/api/login' || model=='/login' || model=='/api/login/' || model=='/login/'){
		
	// }
	// self.layout('layouts/admin');
	self.view('err401',model);
}


function view_403(req,res){
	var self=this;
	self.layout('');
	self.view('err403');
}

function view_404(req,res){
	var self=this;
	self.layout('');
	self.view('err404');
}

function view_408(req,res){
	var self=this;
	self.layout('');
	self.view('err408');
}















































