Skip to content

Commit

Permalink
Added support for databases without secret key
Browse files Browse the repository at this point in the history
  • Loading branch information
marckrenn authored Apr 15, 2017
1 parent 727b948 commit bab6524
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions firebase.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 = =>
Expand Down

0 comments on commit bab6524

Please sign in to comment.