Class: LiffController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/liff_controller.rb

Instance Method Summary collapse

Instance Method Details

#entryObject



5
6
7
8
9
10
11
12
13
14
15
16
# File 'app/controllers/liff_controller.rb', line 5

def entry
  query = Rack::Utils.parse_nested_query(request.query_string)

  # fix liff 2.0 redirect issue
  @need_reload = query["liff.state"].present?
  if(@need_reload)
    querystring = query["liff.state"][(query["liff.state"].index('?')+1)..-1]
    query = Rack::Utils.parse_nested_query(querystring)
  end

  @liff = LiffService.new(query)
end

#routeObject



18
19
20
21
# File 'app/controllers/liff_controller.rb', line 18

def route
  path = params["path"]
  @body = reserve_route(path, request_params: source_info, format: :liff)
end