Skip to content

Commit e9c9498

Browse files
author
刘健
committed
Merge branch 'feature/openapi' into 'main'
Feature/openapi See merge request apipark/APIPark!160
2 parents f780126 + d8cb4a0 commit e9c9498

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

module/ai/iml.go

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -533,6 +533,7 @@ func (i *imlProviderModule) UpdateProviderConfig(ctx context.Context, id string,
533533
DefaultLLM: &input.DefaultLLM,
534534
Config: &input.Config,
535535
Priority: input.Priority,
536+
Status: &status,
536537
}
537538
_, err = i.aiKeyService.DefaultKey(ctx, id)
538539
if err != nil {
@@ -558,17 +559,18 @@ func (i *imlProviderModule) UpdateProviderConfig(ctx context.Context, id string,
558559
return err
559560
}
560561

561-
if input.Enable != nil {
562-
status = 0
563-
if *input.Enable {
564-
status = 1
565-
}
566-
pInfo.Status = &status
567-
}
562+
//if input.Enable != nil {
563+
// status = 0
564+
// if *input.Enable {
565+
// status = 1
566+
// }
567+
// pInfo.Status = &status
568+
//}
568569
err = i.providerService.Save(ctx, id, pInfo)
569570
if err != nil {
570571
return err
571572
}
573+
572574
if *pInfo.Status == 0 {
573575
return i.syncGateway(ctx, cluster.DefaultClusterID, []*gateway.DynamicRelease{
574576
{

stores/api/model.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ type Doc struct {
5555
Id int64 `gorm:"column:id;type:BIGINT(20);AUTO_INCREMENT;NOT NULL;comment:id;primary_key;comment:主键ID;"`
5656
UUID string `gorm:"type:varchar(36);not null;column:uuid;uniqueIndex:uuid;comment:UUID;"`
5757
Service string `gorm:"size:36;not null;column:service;comment:服务;index:service"`
58-
Content string `gorm:"type:text;null;column:content;comment:文档内容"`
58+
Content string `gorm:"type:longtext;null;column:content;comment:文档内容"`
5959
Updater string `gorm:"size:36;not null;column:updater;comment:更新人;index:updater" aovalue:"updater"`
6060
UpdateAt time.Time `gorm:"type:timestamp;NOT NULL;DEFAULT:CURRENT_TIMESTAMP;column:update_at;comment:更新时间"`
6161
APICount int64 `gorm:"type:int(11);not null;column:api_count;comment:接口数量"`

stores/universally/commit/commit.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ type Commit[H any] struct {
77
UUID string `gorm:"size:36;not null;column:uuid;comment:uuid;uniqueIndex:uuid;"`
88
Target string `gorm:"column:target;type:varchar(36);NOT NULL;comment:目标id;index:target;"`
99
Key string `gorm:"size:50;not null;column:key;comment:类型;index:key;"`
10-
Data *H `gorm:"type:text;not null;column:data;comment:数据;charset=utf8mb4;serializer:json"`
10+
Data *H `gorm:"type:longtext;not null;column:data;comment:数据;charset=utf8mb4;serializer:json"`
1111
CreateAt time.Time `gorm:"type:timestamp;NOT NULL;DEFAULT:CURRENT_TIMESTAMP;column:create_at;comment:创建时间"`
1212
Operator string `gorm:"size:36;not null;column:operator;comment:操作人;index:operator;"`
1313
}

0 commit comments

Comments
 (0)