More details on posts and error reporting

This commit is contained in:
2023-05-31 22:12:48 +10:00
parent b034ecb3ab
commit 2c1122c9d7
20 changed files with 177 additions and 39 deletions

View File

@@ -0,0 +1,14 @@
require "sentry-ruby"
Hanami.app.register_provider :sentry, namespace: true do
prepare do
Sentry.init do |config|
config.dsn = target["settings"].sentry_dsn
config.traces_sample_rate = 0.25
end
end
start do
register "client", Sentry
end
end

View File

@@ -25,6 +25,7 @@ module Adamantium
get "/post/top_tracks/:slug", to: "posts.top_tracks"
get "/post/:slug", to: "posts.show"
get "/posts", to: "posts.index"
# get "/posts/archive", to: "posts.archive"
get "/posts/archive/:year", to: "posts.archive"
get "/bookmarks", to: "bookmarks.index"
@@ -82,6 +83,7 @@ module Adamantium
get "/posts", to: "posts.index"
delete "/posts/:id", to: "posts.delete"
post "/posts/:id/archive", to: "posts.archive"
post "/posts/:id/publish", to: "posts.publish"
get "/media", to: "photos.index"

View File

@@ -50,5 +50,8 @@ module Adamantium
setting :basic_auth_username, default: nil
setting :basic_auth_password, default: nil
setting :sentry_dsn, default: nil
setting :raise_exceptions, default: true
end
end