Skip to content

Commit

Permalink
Merge pull request #4 from hiddevdploeg/main
Browse files Browse the repository at this point in the history
Make check login throw for better error handling
  • Loading branch information
rudrankriyam authored Feb 9, 2025
2 parents 31aa889 + 6792544 commit 40a5c3a
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions Sources/UmeroKit/UmeroKit.swift
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,10 @@ extension UmeroKit {
let response = try await request.response()
}

public func checkLogin(username: String, password: String) async -> Bool {
do {
public func checkLogin(username: String, password: String) async throws -> Bool {
let authRequest = UAuthDataRequest(username: username, password: password, apiKey: Self.apiKey, secret: Self.secret)
let authResponse = try await authRequest.response()
return true
} catch {
return false
}
}
}

Expand Down

0 comments on commit 40a5c3a

Please sign in to comment.