Continute typescript conversion
Signed-off-by: Fred Boniface <fred@fjla.uk>
This commit is contained in:
parent
93c8aed105
commit
b717917500
@ -1,4 +1,4 @@
|
|||||||
const valid = [
|
const valid: string[] = [
|
||||||
'owlboard.info',
|
'owlboard.info',
|
||||||
'avantiwestcoast.co.uk',
|
'avantiwestcoast.co.uk',
|
||||||
'btp.police.uk',
|
'btp.police.uk',
|
||||||
@ -33,4 +33,5 @@ const valid = [
|
|||||||
'wmtrains.co.uk',
|
'wmtrains.co.uk',
|
||||||
];
|
];
|
||||||
|
|
||||||
module.exports = valid;
|
module.exports = valid;
|
||||||
|
export { valid }
|
@ -1,3 +1,5 @@
|
|||||||
|
// statusCodes should be a map, not an object
|
||||||
|
|
||||||
const statusCodes = {
|
const statusCodes = {
|
||||||
400: 'data not found',
|
400: 'data not found',
|
||||||
700: 'no authentication attempt',
|
700: 'no authentication attempt',
|
||||||
@ -12,4 +14,5 @@ const statusCodes = {
|
|||||||
951: 'unknown server error'
|
951: 'unknown server error'
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = statusCodes;
|
module.exports = statusCodes;
|
||||||
|
export { statusCodes }
|
@ -1,6 +0,0 @@
|
|||||||
const version = {
|
|
||||||
api: ['/api/v1/','/api/v2'],
|
|
||||||
app: '2023.7.8'
|
|
||||||
};
|
|
||||||
|
|
||||||
module.exports = version;
|
|
12
src/configs/version.configs.ts
Normal file
12
src/configs/version.configs.ts
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
interface versions {
|
||||||
|
api: string[],
|
||||||
|
app: string
|
||||||
|
}
|
||||||
|
|
||||||
|
const version: versions = {
|
||||||
|
api: ['/api/v1/','/api/v2'],
|
||||||
|
app: '2023.7.8'
|
||||||
|
};
|
||||||
|
|
||||||
|
module.exports = version;
|
||||||
|
export { version }
|
@ -1,28 +0,0 @@
|
|||||||
/* global process */
|
|
||||||
// Checks that all required environment variables are present.
|
|
||||||
// Returns True or False and offers an object detailing what is missing.
|
|
||||||
|
|
||||||
async function varTest(){
|
|
||||||
var required = {
|
|
||||||
OWL_LDB_KEY: process.env.OWL_LDB_KEY,
|
|
||||||
OWL_LDB_CORPUSUSER: process.env.OWL_LDB_CORPUSUSER,
|
|
||||||
OWL_LDB_CORPUSPASS: process.env.OWL_LDB_CORPUSPASS,
|
|
||||||
OWL_NOT_USED: process.env.OWL_NOT_USED
|
|
||||||
};
|
|
||||||
var desired = {
|
|
||||||
OWL_DB_PASS: process.env.OWL_DB_PASS
|
|
||||||
};
|
|
||||||
// DO NOT LOG CREDENTIALS!!!
|
|
||||||
|
|
||||||
// Test that each of required is NOT undefined.
|
|
||||||
// var pass = true if all okay, false if not.
|
|
||||||
// Append any missing values to missing_required = []
|
|
||||||
// Test that each of desired is NOT undefined.
|
|
||||||
// Append any missing values to missing_desired = []
|
|
||||||
|
|
||||||
// Return : {pass: $pass, missong_required = $missing_required, missing_desired = $missing_desired}
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = {
|
|
||||||
varTest
|
|
||||||
};
|
|
Loading…
Reference in New Issue
Block a user