refactor: 引用系统模型并入 Update,删除 /referenceSystemModel 端点
非超管 updateModelManage 编辑系统模型时直接插引用行(apiKey 必填、同名唯一、 不拷贝配置),前端继续走 updateModelManage 即可引用,无需换接口。 - 删 service.ReferenceSystemModel / controller.ReferenceModel / ReferenceSystemModelReq/Res - Update:恢复引用行(refSystemModelId>0)个人字段分支(只改 apiKey/enabled/chatModel) - 修复同名唯一性检查丢失自排除(exist.Id != req.Id),允许不改名编辑 - 非超管建引用行补 apiKey 必填校验 Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -18,11 +18,6 @@ func (c *modelManage) CreateModel(ctx context.Context, req *dto.CreateModelManag
|
||||
return service.ModelManage.Create(ctx, req)
|
||||
}
|
||||
|
||||
// ReferenceModel 引用系统模型
|
||||
func (c *modelManage) ReferenceModel(ctx context.Context, req *dto.ReferenceSystemModelReq) (res *dto.ReferenceSystemModelRes, err error) {
|
||||
return service.ModelManage.ReferenceSystemModel(ctx, req)
|
||||
}
|
||||
|
||||
// UpdateModel 更改配置
|
||||
func (c *modelManage) UpdateModel(ctx context.Context, req *dto.UpdateModelManageReq) (res *dto.GetModelManageRes, err error) {
|
||||
return service.ModelManage.Update(ctx, req)
|
||||
|
||||
Reference in New Issue
Block a user