From edd1b21f926f0bcec0033b4b481fe12f54029224 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstro=CC=88m?= Date: Wed, 3 Mar 2021 14:37:56 +0100 Subject: web: Create admin sub-interface --- interfaces/http/admin/admin.rb | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 interfaces/http/admin/admin.rb (limited to 'interfaces/http/admin') diff --git a/interfaces/http/admin/admin.rb b/interfaces/http/admin/admin.rb new file mode 100644 index 0000000..347a051 --- /dev/null +++ b/interfaces/http/admin/admin.rb @@ -0,0 +1,16 @@ +class AdminInterface < Sinatra::Base + enable :sessions + + before ['/admin', '/admin/*'] do + redirect '/login', 303 if not false + end + + get '/login' do + end + + get '/admin' do + @title = $config.title + @posts = Post.all + erb :index + end +end -- cgit v1.2.3