mirror of
https://github.com/logto-io/logto.git
synced 2025-01-13 21:30:30 -05:00
refactor(core): rename middleware
This commit is contained in:
parent
6f18d890ca
commit
e1ec8804b2
3 changed files with 8 additions and 8 deletions
|
@ -12,7 +12,7 @@ import assertThat from '@/utils/assert-that';
|
|||
|
||||
type MiddlewareReturnType = ReturnType<typeof koaLog>;
|
||||
|
||||
export default function koaRegisterAction<StateT, ContextT, ResponseBodyT>(
|
||||
export default function koaPasswordlessRegisterAction<StateT, ContextT, ResponseBodyT>(
|
||||
provider: Provider,
|
||||
via: Via
|
||||
): MiddlewareReturnType {
|
||||
|
|
|
@ -18,7 +18,7 @@ import assertThat from '@/utils/assert-that';
|
|||
|
||||
type MiddlewareReturnType = ReturnType<typeof koaLog>;
|
||||
|
||||
export default function koaSignInAction<StateT, ContextT, ResponseBodyT>(
|
||||
export default function koaPasswordlessSignInAction<StateT, ContextT, ResponseBodyT>(
|
||||
provider: Provider,
|
||||
via: Via
|
||||
): MiddlewareReturnType {
|
||||
|
|
|
@ -22,8 +22,8 @@ import { AnonymousRouter } from '../types';
|
|||
import { passwordlessVerificationTimeout } from './consts';
|
||||
import { flowTypeGuard, viaGuard, PasscodePayload } from './types';
|
||||
import { getRoutePrefix, getPasscodeType, getPasswordlessRelatedLogType } from './utils';
|
||||
// Import koaSignInAction from './middleware/koa-sign-in-action';
|
||||
// import koaRegisterAction from './middleware/koa-register-action';
|
||||
// Import koaPasswordlessSignInAction from './middleware/koa-sign-in-action';
|
||||
// import koaPasswordlessRegisterAction from './middleware/koa-register-action';
|
||||
|
||||
export const registerRoute = getRoutePrefix('register', 'passwordless');
|
||||
export const signInRoute = getRoutePrefix('sign-in', 'passwordless');
|
||||
|
@ -32,10 +32,10 @@ export default function passwordlessRoutes<T extends AnonymousRouter>(
|
|||
router: T,
|
||||
provider: Provider
|
||||
) {
|
||||
// Router.use(`${signInRoute}/sms`, koaSignInAction(provider, 'sms'));
|
||||
// router.use(`${signInRoute}/email`, koaSignInAction(provider, 'email'));
|
||||
// router.use(`${registerRoute}/sms`, koaRegisterAction(provider, 'sms'));
|
||||
// router.use(`${registerRoute}/email`, koaRegisterAction(provider, 'email'));
|
||||
// Router.use(`${signInRoute}/sms`, koaPasswordlessSignInAction(provider, 'sms'));
|
||||
// router.use(`${signInRoute}/email`, koaPasswordlessSignInAction(provider, 'email'));
|
||||
// router.use(`${registerRoute}/sms`, koaPasswordlessRegisterAction(provider, 'sms'));
|
||||
// router.use(`${registerRoute}/email`, koaPasswordlessRegisterAction(provider, 'email'));
|
||||
|
||||
router.post(
|
||||
`/passwordless/:via/send`,
|
||||
|
|
Loading…
Add table
Reference in a new issue