From bab6524fcc4b47cb681f81d6717db8de8f6b2879 Mon Sep 17 00:00:00 2001 From: Marc Krenn Date: Sat, 15 Apr 2017 18:07:29 +0200 Subject: [PATCH] Added support for databases without secret key --- firebase.coffee | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/firebase.coffee b/firebase.coffee index 24068e6..c29f02e 100644 --- a/firebase.coffee +++ b/firebase.coffee @@ -17,7 +17,7 @@ class exports.Firebase extends Framer.BaseClass @debug = @options.debug ?= false @_status ?= "disconnected" - @secretEndPoint = if @secret then "?auth=#{@secret}" else "" + @secretEndPoint = if @secret then "?auth=#{@secret}" else "?" # hotfix super console.log "Firebase: Connecting to Firebase Project '#{@projectID}' ... \n URL: 'https://#{@projectID}.firebaseio.com'" if @debug @@ -41,15 +41,13 @@ class exports.Firebase extends Framer.BaseClass url += "&download=#{parameters.download}" window.open(url,"_self") - url += "&orderBy=" + '"' + parameters.orderBy + '"' if typeof parameters.orderBy is "string" - url += "&limitToFirst=#{parameters.limitToFirst}" if typeof parameters.limitToFirst is "number" + print url += "&limitToFirst=#{parameters.limitToFirst}" if typeof parameters.limitToFirst is "number" url += "&limitToLast=#{parameters.limitToLast}" if typeof parameters.limitToLast is "number" url += "&startAt=#{parameters.startAt}" if typeof parameters.startAt is "number" url += "&endAt=#{parameters.endAt}" if typeof parameters.endAt is "number" url += "&equalTo=#{parameters.equalTo}" if typeof parameters.equalTo is "number" - xhttp = new XMLHttpRequest console.log "Firebase: New '#{method}'-request with data: '#{JSON.stringify(data)}' \n URL: '#{url}'" if debug xhttp.onreadystatechange = =>