2018-01-12 01:56:17 +01:00
|
|
|
const constants = {};
|
|
|
|
|
|
|
|
|
|
constants.amazonResultCodes = {
|
|
|
|
|
ok:200,
|
|
|
|
|
accepted:202,
|
|
|
|
|
badRequest:400,
|
|
|
|
|
unauthorized:401,
|
|
|
|
|
notFound:404,
|
|
|
|
|
conflict:409,
|
|
|
|
|
payloadTooLarge:413
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
constants.apiResultCodes = {
|
|
|
|
|
genericError : -1,
|
|
|
|
|
ok:0,
|
2018-01-16 00:40:03 +01:00
|
|
|
amazonError:1, //amazon api works, but error is some of the amazonResultCodes
|
|
|
|
|
amazonFail:2, //amazon api doesn't work
|
|
|
|
|
databaseError:3,
|
|
|
|
|
noSkill:4,
|
|
|
|
|
inconsistentState:5,
|
2018-01-12 01:56:17 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
constants.skillIDLength = 24;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
module.exports = constants;
|