UNPKG

@intuitionrobotics/permissions

Version:
31 lines 1.83 kB
"use strict"; var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; Object.defineProperty(exports, "__esModule", { value: true }); exports.ServerApi_UserCFsByShareGroups = void 0; const backend_1 = require("@intuitionrobotics/thunderstorm/backend"); const thunderstorm_1 = require("@intuitionrobotics/thunderstorm"); const backend_2 = require("@intuitionrobotics/user-account/backend"); const PermissionsModule_1 = require("../../../modules/PermissionsModule"); class ServerApi_UserCFsByShareGroups extends backend_1.ServerApi { constructor() { super(thunderstorm_1.HttpMethod.POST, "user-cf-by-share-groups"); this.dontPrintResponse(); } process(request, response, queryParams, body) { return __awaiter(this, void 0, void 0, function* () { const account = yield backend_2.AccountModule.validateSession(request, this.getScopes(), response); return PermissionsModule_1.PermissionsModule.getUserCFsByShareGroups(account._id, body.groupsIds); }); } } exports.ServerApi_UserCFsByShareGroups = ServerApi_UserCFsByShareGroups; module.exports = new ServerApi_UserCFsByShareGroups(); //# sourceMappingURL=user-cf-by-share-groups.js.map