Skip to content

Commit

Permalink
BugFix: Endpoint Path
Browse files Browse the repository at this point in the history
  • Loading branch information
eliasjpr authored Nov 16, 2022
1 parent 72da9d1 commit 16f0f90
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/azu/handler/endpoint.cr
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,9 @@ module Azu
{% end %}

def self.path(**params)
params.each do |k, v|
@@resource.gsub(":#{k}", v)
end
@@resource
url = @@resource.not_nil!
params.each { |k, v| url = url.gsub(/\:#{k}/, v) }
url
end

{% request_name = Request.stringify.split("::").last.underscore.downcase.id %}
Expand Down

0 comments on commit 16f0f90

Please sign in to comment.