Browse Source

toastergui: libtoaster Make sure we always pass format=json

The new API for typeahead requires that we pass this parameter in to make
sure we get a JSON response.

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Michael Wood 8 years ago
parent
commit
2f8951d6e6
1 changed files with 1 additions and 0 deletions
  1. 1 0
      lib/toaster/toastergui/static/js/libtoaster.js

+ 1 - 0
lib/toaster/toastergui/static/js/libtoaster.js

@@ -19,6 +19,7 @@ var libtoaster = (function (){
     jQElement.typeahead({
         source: function(query, process){
           xhrParams.search = query;
+          xhrParams.format = "json";
           $.getJSON(xhrUrl, this.options.xhrParams, function(data){
             if (data.error !== "ok") {
               console.log("Error getting data from server "+data.error);