This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class CreateNodes < ActiveRecord::Migration[6.0] | |
def change | |
create_table :nodes do |t| | |
end | |
create_table :node_edges do |t| | |
t.integer :parent_id, null: false | |
t.integer :child_id, null: false | |
end | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
return function(request, next_middleware) | |
local CLIENT_ID = "foo" | |
local CLIENT_SECRET = "bar" | |
local APP_URL = "http://localhost:9000/#overview" | |
if request.uri == '/callback' then | |
local session_code = request.args["code"] | |
local url = "https://github.com/login/oauth/access_token" | |
local request_body = { | |
client_id = CLIENT_ID, |