feat(server): return header with salix-version
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
2f082ece34
commit
40f0d6892c
|
@ -31,7 +31,8 @@
|
||||||
"loopback#token": {}
|
"loopback#token": {}
|
||||||
},
|
},
|
||||||
"auth:after": {
|
"auth:after": {
|
||||||
"./middleware/current-user": {}
|
"./middleware/current-user": {},
|
||||||
|
"./middleware/salix-version": {}
|
||||||
},
|
},
|
||||||
"parse": {
|
"parse": {
|
||||||
"body-parser#json":{}
|
"body-parser#json":{}
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
|
||||||
|
module.exports = function(options) {
|
||||||
|
return function(req, res, next) {
|
||||||
|
const packageJson = require('../../../package.json');
|
||||||
|
|
||||||
|
res.header('Salix-Version', packageJson.version);
|
||||||
|
next();
|
||||||
|
};
|
||||||
|
};
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "salix-back",
|
"name": "salix-back",
|
||||||
"version": "1.0.0",
|
"version": "6.8.0",
|
||||||
"author": "Verdnatura Levante SL",
|
"author": "Verdnatura Levante SL",
|
||||||
"description": "Salix backend",
|
"description": "Salix backend",
|
||||||
"license": "GPL-3.0",
|
"license": "GPL-3.0",
|
||||||
|
|
Loading…
Reference in New Issue