From 660456a217187b6aa8ca133d8618c320911a87c8 Mon Sep 17 00:00:00 2001 From: Youngchan Je Date: Tue, 17 Jan 2017 14:32:34 +0900 Subject: [PATCH] fixed problem on using parameters without secret Without secret, the request url missed `?` and resulted 404 response. --- firebase.coffee | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/firebase.coffee b/firebase.coffee index 24068e6..602694b 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 "" super console.log "Firebase: Connecting to Firebase Project '#{@projectID}' ... \n URL: 'https://#{@projectID}.firebaseio.com'" if @debug @@ -26,7 +26,7 @@ class exports.Firebase extends Framer.BaseClass request = (project, secret, path, callback, method, data, parameters, debug) -> - url = "https://#{project}.firebaseio.com#{path}.json#{secret}" + url = "https://#{project}.firebaseio.com#{path}.json?#{secret}" unless parameters is undefined