В объект Сервиса добавлен контекст исполнения (context)
This commit is contained in:
parent
165b5108e6
commit
6911886e74
@ -138,6 +138,7 @@ class DBConnector extends EventEmitter {
|
|||||||
let srvs = await this.connector.getServices({ connection: this.connection });
|
let srvs = await this.connector.getServices({ connection: this.connection });
|
||||||
srvs.forEach(s => {
|
srvs.forEach(s => {
|
||||||
s.functions = [];
|
s.functions = [];
|
||||||
|
s.context = {};
|
||||||
});
|
});
|
||||||
//Валидируем его
|
//Валидируем его
|
||||||
let sCheckResult = validateObject({ services: srvs }, objServicesSchema.Services, "Список сервисов");
|
let sCheckResult = validateObject({ services: srvs }, objServicesSchema.Services, "Список сервисов");
|
||||||
|
@ -180,5 +180,14 @@ exports.Service = new Schema({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
//Список функций сервиса
|
//Список функций сервиса
|
||||||
functions: defServiceFunctions(true, "functions")
|
functions: defServiceFunctions(true, "functions"),
|
||||||
|
//Контекст работы сервиса
|
||||||
|
context: {
|
||||||
|
type: Object,
|
||||||
|
required: true,
|
||||||
|
message: {
|
||||||
|
type: "Контекст работы сервиса (context) имеет некорректный тип данных (ожидалось - Object)",
|
||||||
|
required: "Не указан контекст работы сервиса (context)"
|
||||||
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user