<commit_before>package controllers

import (
	"log"
	"net/http"

	"github.com/nuveo/prest/adapters/postgres"
	"github.com/nuveo/prest/statements"
)

// GetDatabases list all (or filter) databases
func GetDatabases(w http.ResponseWriter, r *http.Request) {
	w.Header().Set("Content-Type", "application/json")

	object, err := postgres.Query(statements.Databases)
	if err != nil {
		log.Println(err)
	}

	w.Write(object)<commit_msg>set Header via view<commit_after>package controllers

import (
	"log"
	"net/http"

	"github.com/nuveo/prest/adapters/postgres"
	"github.com/nuveo/prest/statements"
)

// GetDatabases list all (or filter) databases
func GetDatabases(w http.ResponseWriter, r *http.Request) {
	object, err := postgres.Query(statements.Databases)
	if err != nil {
		log.Println(err)
	}

	w.Write(object)
{'fraction_non_alphanumeric': 0.14145141451414514, 'fraction_numerical': 0.0, 'mean_word_length': 4.732394366197183, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3567305', 'n_tokens_mistral': 316, 'n_tokens_neox': 297, 'n_words': 56}