Fixing content type from csv to json. Removing unnecessary indexes.

This commit is contained in:
Dessalines 2018-12-02 12:45:48 -07:00
parent 848c41f5f6
commit 990abff8d0
2 changed files with 1 additions and 5 deletions

View File

@ -22,10 +22,6 @@ create table torrents(
.separator ";" .separator ";"
.import torrents_removed_quotes.csv torrents .import torrents_removed_quotes.csv torrents
UPDATE torrents SET completed=NULL WHERE completed = ''; UPDATE torrents SET completed=NULL WHERE completed = '';
# create index idx_name_seeders on torrents (name, seeders desc);
# create index idx_name on torrents (name);
# create index idx_seeders on torrents (seeders desc);
# create index idx_name on torrents (name collate nocase);
EOF EOF
rm torrents_removed_quotes.csv rm torrents_removed_quotes.csv

View File

@ -50,7 +50,7 @@ struct SearchQuery {
fn search(query: Query<SearchQuery>) -> HttpResponse { fn search(query: Query<SearchQuery>) -> HttpResponse {
HttpResponse::Ok() HttpResponse::Ok()
.header("Access-Control-Allow-Origin", "*") .header("Access-Control-Allow-Origin", "*")
.content_type("text/csv") .content_type("application/json")
.body(search_query(query)) .body(search_query(query))
} }