Skip to content

Commit

Permalink
refactor: code refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
naqvis committed Dec 2, 2024
1 parent 53762ba commit ca7a8a6
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/controllers/calendars.cr
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class Calendars < Application

@[AC::Route::Filter(:before_action)]
private def ensure_tenant
raise Error::NotImplemented.new("domain does not have a tenant configured") unless current_tenant
current_tenant
end

@[AC::Route::Filter(:before_action, except: [:index])]
Expand Down Expand Up @@ -67,9 +67,6 @@ class Calendars < Application
calendars = all_calendars.to_a

render :no_content, json: [] of Availability if calendars.empty?

# raise Error::TenantNotFound.new("no tenants exist") if calendars.empty?

# perform availability request
period_start = Time.unix(period_start)
period_end = Time.unix(period_end)
Expand Down

0 comments on commit ca7a8a6

Please sign in to comment.