mirror of
https://github.com/logto-io/logto.git
synced 2024-12-30 20:33:54 -05:00
0105d19d99
* feat(core): add user role related api add user roles related api * fix: insert array to db fix insert array to db fix * feat(core): add role related routes config add role related routes config * fix(core): update user role patch error type update user role patch error type * fix(core): cr fix cr fix * fix(core): cr fix cr fix * fix(core): cr fix cr fix
11 lines
273 B
TypeScript
11 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();
|
|
});
|
|
}
|