Files
node-pkg-express-utils/README.md
Sebastian Seedorf d5930c6140 Updated UserInfo
2020-11-18 08:56:32 +01:00

35 lines
708 B
Markdown

# Express Utils for Node Projects
## Installation
##### 1. Install the package
```
npm install git+https://git.biotronik.int/scm/coe-bs-website/node-pkg-express-utils.git
```
##### 2. Copy the types
Copy the content below to any location within the source folder of your project and name it `extend-request.d.ts`.
It just needs to sit there with no more action required.
```ts
// extend-request.d.ts
declare global {
namespace Express {
interface Request {
getUserInfo(): Promise<import('pkg-express-utils').UserInfo|undefined>;
noLogging: boolean|undefined;
permissionDetails?: import('role-acl').Permission;
}
interface Response {
initLogout(): boolean;
}
}
}
export {};
```