mirror of
https://github.com/Freika/dawarich.git
synced 2026-01-11 17:51:39 -05:00
17 lines
437 B
Ruby
17 lines
437 B
Ruby
# 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
|
|
|
|
response.set_header('X-Dawarich-Version', APP_VERSION)
|
|
|
|
render json: { status: 'ok' }
|
|
end
|
|
end
|