0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2024-12-30 20:33:54 -05:00
logto/packages/core/src/routes/role.ts
simeng-li 0105d19d99
feat(core): add user roles related api (#204)
* 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
2022-01-28 13:33:57 +08:00

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();
});
}