think/packages/domains/lib/models/message.js

26 lines
957 B
TypeScript
Raw Permalink Normal View History

2022-02-20 11:51:55 +00:00
"use strict";
2022-05-18 08:02:29 +00:00
exports.__esModule = true;
2022-06-29 16:03:02 +00:00
exports.buildMessageURL = void 0;
var buildMessageURL = function (type) {
switch (type) {
case 'toDocument':
return function (_a) {
var organizationId = _a.organizationId, wikiId = _a.wikiId, documentId = _a.documentId;
return "/app/org/".concat(organizationId, "/wiki/").concat(wikiId, "/doc/").concat(documentId);
};
case 'toWiki':
return function (_a) {
var organizationId = _a.organizationId, wikiId = _a.wikiId;
return "/app/org/".concat(organizationId, "/wiki/").concat(wikiId);
};
case 'toOrganization':
return function (_a) {
var organizationId = _a.organizationId;
return "/app/org/".concat(organizationId);
};
default:
throw new Error();
}
};
exports.buildMessageURL = buildMessageURL;