mirror of
https://github.com/logto-io/logto.git
synced 2024-12-30 20:33:54 -05:00
12 lines
273 B
TypeScript
12 lines
273 B
TypeScript
|
import { findAllRoles } from '@/queries/roles';
|
||
|
|
||
|
import { AuthedRouter } from './types';
|
||
|
|
||
|
export default function roleRoutes<T extends AuthedRouter>(router: T) {
|
||
|
router.get('/roles', async (ctx, next) => {
|
||
|
ctx.body = await findAllRoles();
|
||
|
|
||
|
return next();
|
||
|
});
|
||
|
}
|