Compare commits

...

2 Commits

Author SHA1 Message Date
61e4a84848
Cleanup
All checks were successful
continuous-integration/drone/push Build is passing
2021-06-20 19:58:18 +02:00
db9084e0a1
Add version for Dockerfile.ek base image 2021-06-20 19:57:06 +02:00
3 changed files with 4 additions and 2 deletions

View File

@ -4,7 +4,7 @@ RUN apk --no-cache add git
RUN go get p83.nl/go/ekster/cmd/ek
# final stage
FROM alpine
FROM alpine:3.7
RUN apk --no-cache add ca-certificates
RUN ["mkdir", "-p", "/opt/micropub"]
WORKDIR /opt/micropub

View File

@ -152,10 +152,12 @@ func loadSession(sessionVar string, conn redis.Conn) (session, error) {
if err != nil {
return sess, err
}
err = redis.ScanStruct(data, &sess)
if err != nil {
return sess, err
}
return sess, nil
}

View File

@ -33,7 +33,6 @@ type indexItem struct {
}
func addToSearch(item microsub.Item, channel string) error {
// TODO: add channel when indexing
if index != nil {
indexItem := indexItem{item, channel}
err := index.Index(item.ID, indexItem)
@ -90,6 +89,7 @@ func querySearch(channel, query string) ([]microsub.Item, error) {
web_1 | (string) (len=16) "author.longitude": (string) "",
*/
// TODO: fetch results from the channel instead of the search result
hits := res.Hits
for _, hit := range hits {
fields := hit.Fields