Compare commits
No commits in common. "5c2466dfaf85e2ade0406276fecc525c25987618" and "4503bc63435d19c9fab0d68146ecd6be48b07c42" have entirely different histories.
5c2466dfaf
...
4503bc6343
3
.env.rb
3
.env.rb
|
|
@ -1,3 +0,0 @@
|
||||||
|
|
||||||
ENV["APP_SESSION_SECRET"] ||= "x3UUSSxLjgP62TOxfIOdf7dhXnOdLiN2kE0K+nB7TA0LsRTpSxhf8Om9cRUYGYQxUMhzIBeZ3KtOLo3cXlSfdg=="
|
|
||||||
# generated with: ruby -rsecurerandom -e 'puts SecureRandom.base64(64).inspect'
|
|
||||||
4
app.rb
4
app.rb
|
|
@ -10,9 +10,11 @@ require_relative 'models/assistant'
|
||||||
# Listing large language models (aka "Assistants")
|
# Listing large language models (aka "Assistants")
|
||||||
class App < Roda
|
class App < Roda
|
||||||
plugin :render, escape: true
|
plugin :render, escape: true
|
||||||
plugin :sessions, secret: ENV.delete('APP_SESSION_SECRET')
|
plugin :route_csrf
|
||||||
|
|
||||||
route do |r|
|
route do |r|
|
||||||
|
check_csrf!
|
||||||
|
|
||||||
r.root do
|
r.root do
|
||||||
@page_title = 'Assistants List'
|
@page_title = 'Assistants List'
|
||||||
@subtitle = 'All Assistants in Database'
|
@subtitle = 'All Assistants in Database'
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
require './.env' if File.exist?('.env.rb')
|
require "./app"
|
||||||
require './app'
|
|
||||||
|
|
||||||
run App.freeze.app
|
run App.freeze.app
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,9 @@
|
||||||
<input type="hidden" name="_method" value="put">
|
<input type="hidden" name="_method" value="put">
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
|
<!-- Add CSRF token tag -->
|
||||||
|
<%== csrf_tag('/assistants') %>
|
||||||
|
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<label class="label">Name</label>
|
<label class="label">Name</label>
|
||||||
<div class="control">
|
<div class="control">
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue