@sync-in/server
Version:
The secure, open-source platform for file storage, sharing, collaboration, and sync
27 lines (26 loc) • 857 B
JavaScript
/*
* Copyright (C) 2012-2025 Johan Legrand <johan.legrand@sync-in.com>
* This file is part of Sync-in | The open source file sync and share solution
* See the LICENSE file for licensing details
*/ "use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "IfHeaderDecorator", {
enumerable: true,
get: function() {
return IfHeaderDecorator;
}
});
function IfHeaderDecorator() {
return (_target, _key, descriptor)=>{
const originalMethod = descriptor.value;
descriptor.value = async function(...args) {
const req = args[0];
const res = args[1];
if (!await this.evaluateIfHeaders(req, res)) return;
return await originalMethod.apply(this, args);
};
};
}
//# sourceMappingURL=if-header.decorator.js.map