mirror of
https://github.com/logto-io/logto.git
synced 2025-01-13 21:30:30 -05:00
6c39790180
* feat(core): add response guard * refactor(core): print error if not prod
11 lines
293 B
TypeScript
11 lines
293 B
TypeScript
import koaGuard from '@/middleware/koa-guard';
|
|
|
|
import { AnonymousRouter } from './types';
|
|
|
|
export default function statusRoutes<T extends AnonymousRouter>(router: T) {
|
|
router.get('/status', koaGuard({ status: 204 }), async (ctx, next) => {
|
|
ctx.status = 204;
|
|
|
|
return next();
|
|
});
|
|
}
|