digitaltwin-core
Version:
Minimalist framework to collect and handle data in a Digital Twin project
16 lines • 529 B
JavaScript
export function servableEndpoint(config) {
return function (target, propertyKey, descriptor) {
const ctor = target.constructor;
if (!ctor.__endpoints) {
ctor.__endpoints = [];
}
ctor.__endpoints.push({
method: (config.method || 'get').toUpperCase(),
path: config.path,
responseType: config.responseType,
handlerName: propertyKey.toString()
});
return descriptor;
};
}
//# sourceMappingURL=servable_endpoint.js.map