mirror of
				https://github.com/Unleash/unleash.git
				synced 2025-10-27 11:02:16 +01:00 
			
		
		
		
	Include module version number in /api reponse
This commit is contained in:
		
							parent
							
								
									6bc23f04da
								
							
						
					
					
						commit
						d58289540c
					
				@ -1,6 +1,7 @@
 | 
			
		||||
'use strict';
 | 
			
		||||
 | 
			
		||||
const { Router } = require('express');
 | 
			
		||||
const version = require('project-version');
 | 
			
		||||
 | 
			
		||||
const adminApi = require('./admin-api');
 | 
			
		||||
const clientApi = require('./client-api');
 | 
			
		||||
@ -17,7 +18,8 @@ exports.router = function(config) {
 | 
			
		||||
 | 
			
		||||
    router.get('/api', (req, res) => {
 | 
			
		||||
        res.json({
 | 
			
		||||
            version: 2,
 | 
			
		||||
            name: 'unleash-server',
 | 
			
		||||
            version,
 | 
			
		||||
            links: {
 | 
			
		||||
                admin: {
 | 
			
		||||
                    uri: '/api/admin',
 | 
			
		||||
 | 
			
		||||
@ -73,6 +73,7 @@
 | 
			
		||||
    "moment": "^2.15.2",
 | 
			
		||||
    "parse-database-url": "^0.3.0",
 | 
			
		||||
    "pg": "^6.4.2",
 | 
			
		||||
    "project-version": "^1.0.0",
 | 
			
		||||
    "prom-client": "^10.0.4",
 | 
			
		||||
    "prometheus-gc-stats": "^0.5.0",
 | 
			
		||||
    "response-time": "^2.3.2",
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user