-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
陈泉
committed
Nov 22, 2022
1 parent
80d20c6
commit 23009af
Showing
15 changed files
with
570 additions
and
574 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,8 @@ | ||
import { ApiHandleMap } from '../../kernel/withHttpServer/types' | ||
import { WechatCallback } from './wechat-callback' | ||
import { AuthCallback } from './auth-callback' | ||
import RouteRecognizer from 'route-recognizer' | ||
|
||
export const TrdApis: ApiHandleMap = { | ||
'/trd/wechat': WechatCallback, | ||
'/custom/auth/social': AuthCallback, | ||
} | ||
export const customRouter = new RouteRecognizer() | ||
|
||
export const TrdApiKeys = Object.keys(TrdApis) | ||
.map((item) => { | ||
return [item.replaceAll('//', '/').toLowerCase(), item] as [ | ||
string, | ||
keyof typeof TrdApis, | ||
] | ||
}) | ||
.filter((item) => item[0].length) | ||
customRouter.add([{ path: '/custom/auth/social', handler: AuthCallback }]) | ||
customRouter.add([{ path: '/trd/wechat', handler: WechatCallback }]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.