dailyshare 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/dailyshare/controllers.rb +5 -6
- data/lib/dailyshare/version.rb +1 -1
- metadata +1 -1
@@ -2,7 +2,6 @@ module DailyShare
|
|
2
2
|
|
3
3
|
class App < Sinatra::Base
|
4
4
|
|
5
|
-
|
6
5
|
get '/' do
|
7
6
|
context = context_from_date(Date.today)
|
8
7
|
@title = "#{CONFIG['seo']['title']} - day #{context[:count]}"
|
@@ -25,6 +24,11 @@ module DailyShare
|
|
25
24
|
end
|
26
25
|
end
|
27
26
|
|
27
|
+
get '/admin' do
|
28
|
+
protected!
|
29
|
+
redirect '/'
|
30
|
+
end
|
31
|
+
|
28
32
|
get '/:name' do
|
29
33
|
if (member = Member.byName(params[:name])).nil?
|
30
34
|
redirect request.referrer
|
@@ -40,11 +44,6 @@ module DailyShare
|
|
40
44
|
slim :member_missing, :locals => { :photos => member.missingPhotos }
|
41
45
|
end
|
42
46
|
|
43
|
-
get '/admin' do
|
44
|
-
protected!
|
45
|
-
redirect '/'
|
46
|
-
end
|
47
|
-
|
48
47
|
get '/logout' do
|
49
48
|
session.delete(:member_id)
|
50
49
|
session.delete(:member_name)
|
data/lib/dailyshare/version.rb
CHANGED