- 新增JWT认证插件,支持用户登录、刷新Token功能 - 添加系统模块管理功能,包括模块的创建、更新和查询 - 更新用户服务,支持用户注册、登录和Token刷新 - 修改数据库表结构,添加模块相关表和字段 - 更新文档,添加JWT认证和模块管理相关说明
18 lines
681 B
JavaScript
18 lines
681 B
JavaScript
import { moduleListSchema, moduleCreateSchema, moduleUpdateSchema } from '#schema/module.schema';
|
|
import { moduleListService, moduleCreateService, moduleUpdateService } from '#services/module/module.service';
|
|
export default async function moduleRoute(fastify, options) {
|
|
// 1. 获取系统模块列表 23-04/23
|
|
fastify.get('/', { schema: moduleListSchema }, moduleListService);
|
|
|
|
// 2. 新增系统模块
|
|
fastify.post('/', { schema: moduleCreateSchema }, moduleCreateService);
|
|
|
|
// 3. 编辑系统模块
|
|
fastify.patch('/:id', { schema: moduleUpdateSchema }, moduleUpdateService);
|
|
|
|
// 4. 删除系统模块
|
|
|
|
// 5. 启用禁用模块
|
|
|
|
// 6. 排序
|
|
} |