Skip to content

Commit

Permalink
autocorrect
Browse files Browse the repository at this point in the history
  • Loading branch information
417-72KI committed Feb 7, 2020
1 parent bafe90e commit ad6d1fb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
20 changes: 10 additions & 10 deletions Sources/GitHubAPI/Starred.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,19 @@ extension GitHubClient {
}
return .success(())
}
.mapError { .other($0) }
.mapError { .other($0) }
}

public func unstar(userId: String, repo: String) -> Result<Void, GitHubClient.Error> {
sendSync(Starred.Delete(owner: userId, repo: repo))
.flatMap {
guard $0.response.statusCode == 204 else {
return .failure(SessionTaskError.responseError(ResponseError.unacceptableStatusCode($0.response.statusCode)))
}
return .success(())
}
.mapError { .other($0) }
}
sendSync(Starred.Delete(owner: userId, repo: repo))
.flatMap {
guard $0.response.statusCode == 204 else {
return .failure(SessionTaskError.responseError(ResponseError.unacceptableStatusCode($0.response.statusCode)))
}
return .success(())
}
.mapError { .other($0) }
}
}

extension GitHubClient {
Expand Down
1 change: 0 additions & 1 deletion Sources/SSGHCore/SSGHCore.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ public extension SSGHCore {

private extension SSGHCore {
func star(to user: User) throws {

dumpInfo("Fetching repos for \(user)...")
let repos = try fetchAllRepos(of: user)
let starrableRepos = try repos.filter { !$0.fork }
Expand Down

0 comments on commit ad6d1fb

Please sign in to comment.