Skip to content

Commit

Permalink
added pds_host/labeler_host helpers that return just hostname
Browse files Browse the repository at this point in the history
  • Loading branch information
mackuba committed Dec 27, 2024
1 parent 05f4dfe commit b149740
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/didkit/services.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,13 @@ def pds_endpoint
def labeler_endpoint
@labeler_endpoint ||= get_service('atproto_labeler', 'AtprotoLabeler')&.endpoint
end

def pds_host
pds_endpoint&.then { |x| URI(x).host }
end

def labeler_host
labeler_endpoint&.then { |x| URI(x).host }
end
end
end

0 comments on commit b149740

Please sign in to comment.