sinatra-hexacta 1.7.18 → 1.7.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8c9e3709270cd64bef803f1d381dd05d6336bd4fba3c14f08be4352470179573
4
- data.tar.gz: a214690224f58528af782cf2e68d81c39d56048f73e83125fbaded3541aacfcf
3
+ metadata.gz: 3e2a48f9974554c9e3d2f4c27c4b0378b301244a4dee41f07fbfc217ce1d450e
4
+ data.tar.gz: 7f208d02ad3db6a73d5a4191f518ee79799d79014ce4afe7e17260bd4fcf7821
5
5
  SHA512:
6
- metadata.gz: f16f135324e926d4b6a874a53fdc6918c2415d561c45310aa653e5ec8e8fdff4d32887a8e58ba15458f92032ce4e4551d373e563e7e3242886869aa9dea4c98b
7
- data.tar.gz: ff01d5f9e159f0f0f2930a519231ab5f665e2fc47c6c9f8a43735d350ef8a3c9a336b8c5f4c30614c5b95736903bf889c2e8c8e9f10061c34b0ba96a664a7cc6
6
+ metadata.gz: b6e04096184e17f002bd542fd08d173af4af41cd2d0525931d1be2136b244fe23e67bc425834995037a512496cfb7405b7c606ad1080c6a34c1f947020221b5f
7
+ data.tar.gz: c663c87d329a6c49b6915deaa82fa91409ba96ebdbc86f0740d6e6cad8e1eb728389e8656ae5702dd2b8db7e443a64107eab19292406e3ad978058bf75dc7820
@@ -37,7 +37,9 @@ module Sinatra
37
37
  end
38
38
 
39
39
  delete '/notifications/:id' do |id|
40
- Notification.find(:user_id => authenticated(User).id, :id => id).destroy.to_hash.to_json.to_s
40
+ notification = Notification.find(:user_id => authenticated(User).id, :id => id)
41
+ error(404) if notification.nil?
42
+ notification.destroy.to_hash.to_json.to_s
41
43
  end
42
44
 
43
45
  delete '/notifications' do
@@ -60,11 +60,16 @@ module Sinatra
60
60
  end
61
61
 
62
62
  get '/reports/:report_name' do |report_name|
63
- date = Date.parse(params[:date]) unless params[:date].nil?
64
- date ||= Date.today
65
- headers "Content-Disposition" => "attachment;filename=#{report_name}.#{date}.xls",
66
- "Content-Type" => "application/octet-stream"
67
- slim "reports/#{report_name}".to_sym, locals: { :date => date }, :stream => true, :layout => false
63
+ begin
64
+ date = Date.parse(params[:date]) unless params[:date].nil?
65
+ date ||= Date.today
66
+ headers "Content-Disposition" => "attachment;filename=#{report_name}.#{date}.xls",
67
+ "Content-Type" => "application/octet-stream"
68
+ slim "reports/#{report_name}".to_sym, locals: { :date => date }, :stream => true, :layout => false
69
+ rescue Exception => e
70
+ NotificationSender.instance.send_error(authenticated(User),e.message,e.backtrace.join('\n'))
71
+ halt 400, e.message
72
+ end
68
73
  end
69
74
  end
70
75
 
@@ -49,7 +49,7 @@ body.darkmode #header #menu-trigger .line-wrap .line {
49
49
  }
50
50
 
51
51
  body.darkmode #header input {
52
- border-bottom: 2px solid white !important;
52
+ border-bottom: 0px !important;
53
53
  }
54
54
 
55
55
  #header input::placeholder {
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sinatra-hexacta
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.18
4
+ version: 1.7.19
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marco Zanger