dawarich/app/controllers/api/v1/health_controller.rb

18 lines
437 B
Ruby
Raw Normal View History

2024-09-05 15:16:40 -04:00
# frozen_string_literal: true
class Api::V1::HealthController < ApiController
skip_before_action :authenticate_api_key
def index
if current_api_user
response.set_header('X-Dawarich-Response', 'Hey, I\'m alive and authenticated!')
else
response.set_header('X-Dawarich-Response', 'Hey, I\'m alive!')
end
2025-02-06 13:50:03 -05:00
response.set_header('X-Dawarich-Version', APP_VERSION)
2024-09-05 15:16:40 -04:00
render json: { status: 'ok' }
end
end