mirror of
https://github.com/logto-io/logto.git
synced 2024-12-30 20:33:54 -05:00
chore(test): add SIE API guard (#3774)
This commit is contained in:
parent
6a463f6a2a
commit
64a01f18d8
1 changed files with 13 additions and 4 deletions
|
@ -21,11 +21,18 @@ export default function signInExperiencesRoutes<T extends AuthedRouter>(
|
||||||
* As we only support single signInExperience settings for V1
|
* As we only support single signInExperience settings for V1
|
||||||
* always return the default settings in DB for the /sign-in-exp get method
|
* always return the default settings in DB for the /sign-in-exp get method
|
||||||
*/
|
*/
|
||||||
router.get('/sign-in-exp', async (ctx, next) => {
|
router.get(
|
||||||
|
'/sign-in-exp',
|
||||||
|
koaGuard({
|
||||||
|
response: SignInExperiences.guard,
|
||||||
|
status: [200],
|
||||||
|
}),
|
||||||
|
async (ctx, next) => {
|
||||||
ctx.body = await findDefaultSignInExperience();
|
ctx.body = await findDefaultSignInExperience();
|
||||||
|
|
||||||
return next();
|
return next();
|
||||||
});
|
}
|
||||||
|
);
|
||||||
|
|
||||||
router.patch(
|
router.patch(
|
||||||
'/sign-in-exp',
|
'/sign-in-exp',
|
||||||
|
@ -40,6 +47,8 @@ export default function signInExperiencesRoutes<T extends AuthedRouter>(
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
.partial(),
|
.partial(),
|
||||||
|
response: SignInExperiences.guard,
|
||||||
|
status: [200],
|
||||||
}),
|
}),
|
||||||
async (ctx, next) => {
|
async (ctx, next) => {
|
||||||
const {
|
const {
|
||||||
|
|
Loading…
Reference in a new issue