Skip to content

Commit

Permalink
#74 use project token instead of project name in ihatemoney authString
Browse files Browse the repository at this point in the history
  • Loading branch information
m-idler committed Mar 30, 2024
1 parent 49d046c commit 6b36f20
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion PayForMe/Services/NetworkService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ class NetworkService {
request = URLRequest(url: requestURL)

if project.backend == .iHateMoney {
guard let authString = "\(project.name):\(project.password)".data(using: .utf8)?.base64EncodedString() else { fatalError("error generating authString. THIS SHOULD NOT HAPPEN") }
guard let authString = "\(project.token):\(project.password)".data(using: .utf8)?.base64EncodedString() else { fatalError("error generating authString. THIS SHOULD NOT HAPPEN") }
request.setValue("Basic \(authString)", forHTTPHeaderField: "Authorization")

if !params.isEmpty {
Expand Down

0 comments on commit 6b36f20

Please sign in to comment.