@wepublish/api
Version:
API core for we.publish.
15 lines • 849 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Settings = exports.SETTINGS_METADATA_KEY = void 0;
const common_1 = require("@nestjs/common");
const api_1 = require("../../../authentication-api/src");
const nest_modules_1 = require("@wepublish/nest-modules");
const settings_guard_1 = require("./settings.guard");
exports.SETTINGS_METADATA_KEY = 'settings';
/**
* Causes the method/class to require a setting to be truthy to be called.
* This uses the `OneOf` decorator, so if there are multiple guards attached, only one has to return true.
*/
const Settings = (...settings) => (0, common_1.applyDecorators)((0, nest_modules_1.AddMetadata)(exports.SETTINGS_METADATA_KEY, settings), (0, api_1.OneOf)(settings_guard_1.SettingsGuard));
exports.Settings = Settings;
//# sourceMappingURL=settings.decorator.js.map