UNPKG

@enonic/mock-xp

Version:

Mock Enonic XP API JavaScript Library

24 lines (23 loc) 785 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Controller = void 0; var tslib_1 = require("tslib"); var Resource_1 = require("./Resource"); var Controller = (function (_super) { tslib_1.__extends(Controller, _super); function Controller(_a) { var app = _a.app, path = _a.path; if (path.startsWith('/assets/')) { throw new Error('Controller path must NOT start with "/assets/"!'); } if (path.startsWith('/import/')) { throw new Error('Controller path must NOT start with "/import/"!'); } return _super.call(this, { app: app, path: path, }) || this; } return Controller; }(Resource_1.Resource)); exports.Controller = Controller;