UNPKG

@sync-in/server

Version:

The secure, open-source platform for file storage, sharing, collaboration, and sync

27 lines (26 loc) 948 B
/* * 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, "SYNC_PATH_TO_SPACE_SEGMENTS", { enumerable: true, get: function() { return SYNC_PATH_TO_SPACE_SEGMENTS; } }); const _routes = require("../../spaces/utils/routes"); const _sync = require("../constants/sync"); function SYNC_PATH_TO_SPACE_SEGMENTS(path) { const urlSegments = (0, _routes.PATH_TO_SPACE_SEGMENTS)(path); const repository = urlSegments.shift(); if (!(repository in _sync.SYNC_REPOSITORY)) { throw new Error(`Repository not found : ${repository}`); } urlSegments.unshift(..._sync.SYNC_PATH_REPOSITORY[repository]); return urlSegments; } //# sourceMappingURL=routes.js.map