mirror of
https://github.com/Freika/dawarich.git
synced 2026-01-10 17:21:38 -05:00
Merge pull request #803 from Freika/feature/app-version-in-health-response
Return app version in health response
This commit is contained in:
commit
4e0e9450d9
4 changed files with 15 additions and 1 deletions
|
|
@ -1 +1 @@
|
|||
0.23.6
|
||||
0.23.7
|
||||
|
|
|
|||
|
|
@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
|
|||
The format is based on [Keep a Changelog](http://keepachangelog.com/)
|
||||
and this project adheres to [Semantic Versioning](http://semver.org/).
|
||||
|
||||
## 0.23.7 - 2025-02-06
|
||||
|
||||
### Added
|
||||
|
||||
- `X-Dawarich-Version` header to the `GET /api/v1/health` endpoint response.
|
||||
|
||||
# 0.23.6 - 2025-02-06
|
||||
|
||||
### Added
|
||||
|
|
|
|||
|
|
@ -10,6 +10,8 @@ class Api::V1::HealthController < ApiController
|
|||
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
|
||||
|
|
|
|||
|
|
@ -23,5 +23,11 @@ RSpec.describe 'Api::V1::Healths', type: :request do
|
|||
expect(response.headers['X-Dawarich-Response']).to eq('Hey, I\'m alive and authenticated!')
|
||||
end
|
||||
end
|
||||
|
||||
it 'returns the correct version' do
|
||||
get '/api/v1/health'
|
||||
|
||||
expect(response.headers['X-Dawarich-Version']).to eq(APP_VERSION)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in a new issue