'use strict';
import { apiUnauthorizedError, apiBadRequestError } from '../../../fd-toolbox/server/web/errors.js';
import { getUserId } from '../../meta/server/auth/users/current-user-id-provider.js';
import { isEmptyNullOrUndefined } from '../../../fd-toolbox/functions/value-checking-functions.js';
import { getCurrentWorkspaceId } from '../../meta/server/providers/current-workspace-id-provider.js';

var __defProp=Object['defineProperty'],__name=(_0x7fb231,_0x14996d)=>__defProp(_0x7fb231,'name',{'value':_0x14996d,'configurable':!![]});async function getUserAndWorkspaceIds(){const _0x278f06=await getUserId();if(isEmptyNullOrUndefined(_0x278f06))throw apiUnauthorizedError();const _0x3765ec=await getCurrentWorkspaceId();if(isEmptyNullOrUndefined(_0x3765ec))throw apiBadRequestError();return {'userId':_0x278f06,'workspaceId':_0x3765ec};}__name(getUserAndWorkspaceIds,'getUserAndWorkspaceIds');

export { getUserAndWorkspaceIds };
