e703bb7415
* feat(workspaces): drop createdByUserId from the dataschema * feat(workspaces): repositories WIP * merge * protect against removing last admin in workspace * quick impl and stub tests * add tests * services * unit tests for role services * fix(workspaces): maybe tests work like this * fix(workspaces): dry * fix(workspaces): initialize tests better * fix(workspaces): so true * fix(workspaces): right * fix(workspaces): self nit * fix(workspaces): better repository structure * fix(workspaces): repair tests, use `example.org` * fix(workspaces): add tests for new repo functions, repair other tests * fix(workspaces): better distinction between service-level guarantees and repo-level guarantees * fix(workspaces): review comments and stencil tests * fix(workspaces): add tests * fix(workspaces): tests work --------- Co-authored-by: Gergő Jedlicska <gergo@jedlicska.com>
8 lines
266 B
TypeScript
8 lines
266 B
TypeScript
import { BaseError } from '@/modules/shared/errors/base'
|
|
|
|
export class WorkspaceAdminRequiredError extends BaseError {
|
|
static defaultMessage = 'Cannot remove last admin from a workspace'
|
|
static code = 'WORKSPACE_ADMIN_REQUIRED_ERROR'
|
|
static statusCode = 400
|
|
}
|