モバイルアプリのバックエンドとして contentful を使用しています。
試合の備品は contentful 内に保存されます。次の一致を照会したいのですが、次のエラーが発生します。
422 (Unprocessable Entity)
次の一致を取得する私の関数:
function nextOpponent(){
var content_Type = mainConfig.config.contentType.match // Matches
var order = "fields.datum";
var gt = new Date().toLocaleString();
console.log(gt);
var query = "content_type=" + content_Type +
"&order=" + order +
"&fields.datum%5Bgte%5D=" + encodeURI(gt);
contentful.entries(query).then(
//success
function(response){
$scope.nextMatch = response.data.items[0];
console.log($scope.nextMatch);
},
//error
function(response){
}
)
}