view pkg/controllers/publish.go @ 744:6fe6839f5ce6

Make search return an array of features, including name. This form should be sufficiently generic.
author Sascha Wilde <wilde@intevation.de>
date Mon, 24 Sep 2018 13:51:26 +0200
parents b2dc9c2f69e0
children a244b18cb916
line wrap: on
line source

package controllers

import (
	"database/sql"
	"net/http"

	"gemma.intevation.de/gemma/pkg/models"
)

func published(_ interface{}, req *http.Request, _ *sql.Conn) (jr JSONResult, err error) {
	jr = JSONResult{
		Result: struct {
			Internal []models.IntEntry `json:"internal"`
			External []models.ExtEntry `json:"external"`
		}{
			Internal: models.InternalServices.Filter(models.InternalAll),
			External: models.ExternalServices.Filter(models.ExternalAll),
		},
	}
	return
}