Skip to content

Commit e131dc7

Browse files
authored
Merge pull request #27 from namecheap/feat/redirect-code
feat(types): pass matched route
2 parents aae38b8 + c0118f0 commit e131dc7

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

src/plugins/transitionHooks/common.types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ export interface Route {
44
[key: string]: any;
55
};
66
hostname: string;
7+
route: string;
78
}
89

910
export interface TransitionContinue {

src/plugins/transitionHooks/server.spec.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ describe('Server transition hooks suite', () => {
4141
},
4242
url: '/some/url',
4343
hostname: 'example.com',
44+
route: '/some/*'
4445
};
4546

4647
const req = {
@@ -63,6 +64,7 @@ describe('Server transition hooks suite', () => {
6364
},
6465
url: '/some/url',
6566
hostname: 'example.com',
67+
route: '/some/*'
6668
};
6769

6870
const req = {
@@ -87,6 +89,7 @@ describe('Server transition hooks suite', () => {
8789
},
8890
url: '/some/url',
8991
hostname: 'example.com',
92+
route: '/some/*'
9093
};
9194

9295
const req = {
@@ -108,6 +111,7 @@ describe('Server transition hooks suite', () => {
108111
},
109112
url: '/some/url',
110113
hostname: 'example.com',
114+
route: '/some/*'
111115
};
112116

113117
const req = {

0 commit comments

Comments
 (0)