From 6b36f20c384a5b504183b0c06b06f1ab36feb160 Mon Sep 17 00:00:00 2001 From: "m.idler" Date: Sat, 30 Mar 2024 23:04:24 +0100 Subject: [PATCH] #74 use project token instead of project name in ihatemoney authString --- PayForMe/Services/NetworkService.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PayForMe/Services/NetworkService.swift b/PayForMe/Services/NetworkService.swift index 273ffb7..eeb3095 100644 --- a/PayForMe/Services/NetworkService.swift +++ b/PayForMe/Services/NetworkService.swift @@ -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 {