all files / generators/api/commons/ util.js

100% Statements 8/8
100% Branches 0/0
100% Functions 3/3
100% Lines 8/8
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23                             
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
/**
 * Class which contains Util generated content class.
 *
 * @export
 * @class Util
 */
var Util = (function () {
    function Util() {
    }
    /**
     * This method returns Util class string content
     * @return {string} - Util class content as string
     */
    Util.prototype.getUtil = function () {
        return "class Util {\n  generateLocationUri(request, id) {\n    return request.protocol + '://' + request.get('host') + request.originalUrl + '/' + id;\n  }\n}\n\nmodule.exports = new Util();";
    };
    return Util;
}());
exports.Util = Util;
exports.default = new Util();