feat(api): expose family exports (#1632)

* feat(api): expose family exports

* fix(api): harden family export review paths

* fix(api): tighten family export review paths

* fix(api): reject invalid family export params

* fix(api): address family export review

* fix(api): share uuid guard for exports
This commit is contained in:
ghost
2026-05-03 03:29:29 -06:00
committed by GitHub
parent 6c84fc760e
commit 50936000e7
11 changed files with 803 additions and 6 deletions

View File

@@ -3,6 +3,9 @@
class Api::V1::BaseController < ApplicationController
include Doorkeeper::Rails::Helpers
UUID_PATTERN = /\A[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\z/i
private_constant :UUID_PATTERN
# Skip regular session-based authentication for API
skip_authentication
@@ -209,6 +212,10 @@ class Api::V1::BaseController < ApplicationController
render json: data, status: status
end
def valid_uuid?(value)
value.to_s.match?(UUID_PATTERN)
end
# Error handlers
def handle_not_found(exception)
Rails.logger.warn "API Record Not Found: #{exception.message}"