update
This commit is contained in:
parent
ce2d4fedb9
commit
3960a1a5d5
@ -4,7 +4,6 @@ import (
|
||||
"context"
|
||||
"database/sql"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"github.com/sqlc-dev/pqtype"
|
||||
"penahub.gitlab.yandexcloud.net/backend/quiz/common.git/dal/sqlcgen"
|
||||
"penahub.gitlab.yandexcloud.net/backend/quiz/common.git/model"
|
||||
@ -386,11 +385,8 @@ func (r *AmoRepository) GetTagsWithPagination(ctx context.Context, req *model.Pa
|
||||
count = row.TotalCount
|
||||
|
||||
var entity model.EntityType
|
||||
if v, ok := row.Entity.(string); ok {
|
||||
entity = model.EntityType(v)
|
||||
} else {
|
||||
fmt.Println("unexpected type for EntityType:", row.Entity)
|
||||
}
|
||||
v := string(row.Entity.([]byte))
|
||||
entity = model.EntityType(v)
|
||||
|
||||
tag := model.Tag{
|
||||
ID: row.ID,
|
||||
@ -434,11 +430,8 @@ func (r *AmoRepository) CheckTags(ctx context.Context, tags []model.Tag, tokenID
|
||||
var toUpdate []model.Tag
|
||||
for _, row := range rows {
|
||||
var entity model.EntityType
|
||||
if v, ok := row.Entity.(string); ok {
|
||||
entity = model.EntityType(v)
|
||||
} else {
|
||||
fmt.Println("unexpected type for EntityType:", row.Entity)
|
||||
}
|
||||
v := string(row.Entity.([]byte))
|
||||
entity = model.EntityType(v)
|
||||
to := model.Tag{
|
||||
ID: row.ID,
|
||||
Amoid: row.Amoid,
|
||||
@ -486,11 +479,8 @@ func (r *AmoRepository) GetFieldsWithPagination(ctx context.Context, req *model.
|
||||
count = row.TotalCount
|
||||
|
||||
var entity model.EntityType
|
||||
if v, ok := row.Entity.(string); ok {
|
||||
entity = model.EntityType(v)
|
||||
} else {
|
||||
fmt.Println("unexpected type for EntityType:", row.Entity)
|
||||
}
|
||||
v := string(row.Entity.([]byte))
|
||||
entity = model.EntityType(v)
|
||||
|
||||
field := model.Field{
|
||||
ID: row.ID,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user