Skip to content

Commit

Permalink
POST streams/:id/ requires latitude and longitude params (roundware#35)
Browse files Browse the repository at this point in the history
  • Loading branch information
hburgund committed Mar 4, 2018
1 parent 68b1eac commit 24e9041
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions RWFramework/RWFramework/RWFrameworkHTTP.swift
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@ extension RWFramework: URLSessionDelegate, URLSessionTaskDelegate, URLSessionDat
}
}

func httpPostStreams(_ session_id: NSNumber, completion:@escaping (_ data: Data?, _ error: NSError?) -> Void) {
func httpPostStreams(_ session_id: NSNumber, latitude: String = "0", longitude: String = "0", completion:@escaping (_ data: Data?, _ error: NSError?) -> Void) {
if let url = URL(string: RWFrameworkURLFactory.postStreamsURL()) {
let postData = ["session_id": session_id]
let postData = ["session_id": session_id, "latitude": latitude, "longitude": longitude] as [String:Any]
postDataToURL(url, postData: postData, completion: completion)
} else {
let error = NSError(domain:self.reverse_domain, code:NSURLErrorBadURL, userInfo:[NSLocalizedDescriptionKey : "postStreamsURL unable to be created."])
Expand Down

0 comments on commit 24e9041

Please sign in to comment.