File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22
33## [ Unreleased]
44
5+ ## [ 0.2.2] - 2023-08-28Z
6+ * [ #12 ] ( https://github.com/Blackjacx/ASCKit/pull/12 ) : Add token subcommand to keys - [ @Blackjacx ] ( https://github.com/blackjacx ) .
7+
58## [ 0.2.1] - 2023-08-24Z
69* Add log to show which tester is processed - [ @Blackjacx ] ( https://github.com/blackjacx ) .
710
Original file line number Diff line number Diff line change @@ -57,16 +57,16 @@ public struct ASCService {
5757
5858 // MARK: - Creating Access Token
5959
60- static func createAccessToken( ) throws -> String {
60+ public static func createAccessToken( keyId : String ? = specifiedKeyId ) throws -> String {
6161
6262 let key : ApiKey
6363
6464 // Prefer key specified via parameter over activated one
65- if let specifiedKeyId = specifiedKeyId {
66- guard let specifiedKey = apiKeys. first ( where: { $0. id == specifiedKeyId } ) else {
67- throw AscError . apiKeyNotFound ( specifiedKeyId )
65+ if let keyId {
66+ guard let matchingKey = apiKeys. first ( where: { $0. id == keyId } ) else {
67+ throw AscError . apiKeyNotFound ( keyId )
6868 }
69- key = specifiedKey
69+ key = matchingKey
7070 } else if let activeKey = apiKeys. first ( where: { $0. isActive } ) {
7171 // Go with active API key
7272 key = activeKey
You can’t perform that action at this time.
0 commit comments