mirror of
https://github.com/Xevion/banner.git
synced 2025-12-15 08:11:11 -06:00
Lower default result c ount, fix header for title/keyword search params
This commit is contained in:
@@ -28,7 +28,7 @@ type Query struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func NewQuery() *Query {
|
func NewQuery() *Query {
|
||||||
return &Query{maxResults: 10, offset: 0}
|
return &Query{maxResults: 8, offset: 0}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Subject sets the subject for the query
|
// Subject sets the subject for the query
|
||||||
@@ -177,11 +177,11 @@ func (q *Query) Paramify() map[string]string {
|
|||||||
|
|
||||||
if q.title != nil {
|
if q.title != nil {
|
||||||
// Whitespace can prevent valid queries from succeeding
|
// Whitespace can prevent valid queries from succeeding
|
||||||
params["txt_title"] = strings.TrimSpace(*q.title)
|
params["txt_courseTitle"] = strings.TrimSpace(*q.title)
|
||||||
}
|
}
|
||||||
|
|
||||||
if q.keywords != nil {
|
if q.keywords != nil {
|
||||||
params["txt_keyword"] = strings.Join(*q.keywords, " ")
|
params["txt_keywordlike"] = strings.Join(*q.keywords, " ")
|
||||||
}
|
}
|
||||||
|
|
||||||
if q.openOnly != nil {
|
if q.openOnly != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user