Added routing to join a cluster by the UUID.

This commit is contained in:
James Patrick 2020-05-23 02:35:34 -04:00
parent 052fab1d91
commit f122f942e3
2 changed files with 4 additions and 1 deletions

View File

@ -8,6 +8,7 @@ class CounterController < ApplicationController
private
def associate!
session[:cluster_uuid] = params[:uuid] if params[:uuid]
redirect_to cluster_path unless valid_cluster?
end
end

View File

@ -3,6 +3,8 @@
Rails.application.routes.draw do
root 'counter#show'
get '/cluster', to: 'cluster#new'
get '/cluster', to: 'cluster#show'
post '/cluster', to: 'cluster#create'
get '/cluster/:uuid', to: 'counter#show'
end