fix error in GetQuizList repo method
This commit is contained in:
parent
66af1731d3
commit
e6ffe98631
@ -137,12 +137,12 @@ func (r *QuizRepository) GetQuizList(
|
||||
}
|
||||
|
||||
if deps.Status != "" {
|
||||
data = append(data, deps.Status)
|
||||
whereClause = append(whereClause, fmt.Sprintf("status = $%d", len(data)))
|
||||
//data = append(data, deps.Status)
|
||||
whereClause = append(whereClause, fmt.Sprintf("status = '%s'", deps.Status))
|
||||
}
|
||||
if deps.Search != "" {
|
||||
data = append(data, deps.Search)
|
||||
whereClause = append(whereClause, fmt.Sprintf("to_tsvector('russian', name) @@ to_tsquery('russian', $%d)", len(data)))
|
||||
//data = append(data, deps.Search)
|
||||
whereClause = append(whereClause, fmt.Sprintf("to_tsvector('russian', name) @@ to_tsquery('russian', '%s')", deps.Search))
|
||||
}
|
||||
|
||||
if len(whereClause) != 0 {
|
||||
|
Loading…
Reference in New Issue
Block a user