update amo repo methods
This commit is contained in:
parent
4ca35ec382
commit
bb9fb36a60
@ -314,12 +314,10 @@ func (r *AmoRepository) CheckPipelines(ctx context.Context, pipelines []model.Pi
|
||||
var toUpdate []model.Pipeline
|
||||
for _, row := range rows {
|
||||
to := model.Pipeline{
|
||||
ID: row.ID,
|
||||
Amoid: row.Amoid,
|
||||
AccountID: row.Accountid,
|
||||
Name: row.Name,
|
||||
Isarchive: row.Isarchive,
|
||||
Createdat: row.Createdat.Time.Unix(),
|
||||
}
|
||||
toUpdate = append(toUpdate, to)
|
||||
}
|
||||
@ -389,13 +387,11 @@ func (r *AmoRepository) CheckSteps(ctx context.Context, steps []model.Step) erro
|
||||
var toUpdate []model.Step
|
||||
for _, row := range rows {
|
||||
to := model.Step{
|
||||
ID: row.ID,
|
||||
Amoid: row.Amoid,
|
||||
Pipelineid: row.Pipelineid,
|
||||
Accountid: row.Accountid,
|
||||
Name: row.Name,
|
||||
Color: row.Color,
|
||||
Createdat: row.Createdat.Time.Unix(),
|
||||
}
|
||||
toUpdate = append(toUpdate, to)
|
||||
}
|
||||
@ -473,13 +469,11 @@ func (r *AmoRepository) CheckTags(ctx context.Context, tags []model.Tag, tokenID
|
||||
v := string(row.Entity.([]byte))
|
||||
entity = model.EntityType(v)
|
||||
to := model.Tag{
|
||||
ID: row.ID,
|
||||
Amoid: row.Amoid,
|
||||
Accountid: row.Accountid,
|
||||
Accountid: row.Amoid_2,
|
||||
Entity: entity,
|
||||
Name: row.Name,
|
||||
Color: &row.Color,
|
||||
Createdat: row.Createdat.Time.Unix(),
|
||||
}
|
||||
toUpdate = append(toUpdate, to)
|
||||
}
|
||||
@ -567,13 +561,11 @@ func (r *AmoRepository) CheckFields(ctx context.Context, fields []model.Field, t
|
||||
v := string(row.Entity.([]byte))
|
||||
entity = model.EntityType(v)
|
||||
to := model.Field{
|
||||
ID: row.ID,
|
||||
Amoid: row.Amoid,
|
||||
Code: row.Code,
|
||||
Accountid: row.Accountid,
|
||||
Accountid: row.Amoid_2,
|
||||
Entity: entity,
|
||||
Type: row.Type,
|
||||
Createdat: row.Createdat.Time.Unix(),
|
||||
}
|
||||
toUpdate = append(toUpdate, to)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user