@capimjs/library-auth
Version:
Professional API using Clean Architecture and TDD. to group validators
1 lines • 767 B
JavaScript
Object.defineProperty(exports,"__esModule",{value:true});function _export(target,all){for(var name in all)Object.defineProperty(target,name,{enumerable:true,get:all[name]})}_export(exports,{tcpOk:()=>tcpOk,tcpBadRequest:()=>tcpBadRequest,tcpUnauthorized:()=>tcpUnauthorized,tcpForbidden:()=>tcpForbidden,tcpServerError:()=>tcpServerError,tcpNotFound:()=>tcpNotFound});const _errors=require("../errors");const tcpOk=data=>({data});const tcpBadRequest=error=>({data:error});const tcpUnauthorized=()=>({data:new _errors.UnauthorizedError});const tcpForbidden=()=>({data:new _errors.ForbiddenError});const tcpServerError=error=>({data:new _errors.ServerError(error instanceof Error?error:undefined)});const tcpNotFound=()=>({data:new _errors.NotFoundError});
;