ts: lib/middleware/codiMDVersion.js

Signed-off-by: Raccoon <raccoon@hackmd.io>
This commit is contained in:
Raccoon 2021-06-12 05:18:24 +08:00
parent 758ffd462a
commit 68439de268
No known key found for this signature in database
GPG Key ID: 06770355DC9ECD38
2 changed files with 9 additions and 10 deletions

View File

@ -1,10 +0,0 @@
'use strict'
const config = require('../config')
module.exports = function (req, res, next) {
res.set({
'CodiMD-Version': config.version
})
return next()
}

View File

@ -0,0 +1,9 @@
import * as config from "../config";
import {Request, Response} from "express";
export = function (req: Request, res: Response, next) {
res.set({
'CodiMD-Version': config.version
})
return next()
}