diff options
| author | Melonai <einebeere@gmail.com> | 2021-08-16 18:17:06 +0200 |
|---|---|---|
| committer | Melonai <einebeere@gmail.com> | 2021-08-16 18:17:06 +0200 |
| commit | a7af012b92f0dfd90cc3eb570e03144016646180 (patch) | |
| tree | f73d402f1d74459195967928346d26ad195a2a73 /assets/src/models/incoming_request.ts | |
| parent | 877f2aa4cc5890214f0c58813c4b498f8be1236d (diff) | |
| download | rook-a7af012b92f0dfd90cc3eb570e03144016646180.tar.zst rook-a7af012b92f0dfd90cc3eb570e03144016646180.zip | |
Ability to pass request info through pipeline
Diffstat (limited to 'assets/src/models/incoming_request.ts')
| -rw-r--r-- | assets/src/models/incoming_request.ts | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/assets/src/models/incoming_request.ts b/assets/src/models/incoming_request.ts index 8a8d7fb..4af1e02 100644 --- a/assets/src/models/incoming_request.ts +++ b/assets/src/models/incoming_request.ts @@ -18,6 +18,11 @@ export enum IncomingRequestState { // Identifying information about the requestor export type IncomingRequestInfo = { token: string; + + ip: string; + location: string; + client: string; + receivedAt: Date; }; @@ -31,9 +36,18 @@ export type IncomingRequest = { }; // Create a model for a new incoming request -export function newIncomingRequest(token: string): IncomingRequest { +export function newIncomingRequest( + token: string, + ip: string, + location: string, + client: string +): IncomingRequest { const info = { token, + ip, + location, + client, + receivedAt: new Date(), }; |
