mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-14 05:14:54 +00:00
feat(server): role changed email (#9227)
This commit is contained in:
@@ -166,7 +166,7 @@ function generateErrorArgs(name: string, args: ErrorArgs) {
|
||||
|
||||
export function generateUserFriendlyErrors() {
|
||||
const output = [
|
||||
'/* eslint-disable */',
|
||||
'/* oxlint-disable */',
|
||||
'// AUTO GENERATED FILE',
|
||||
`import { createUnionType, Field, ObjectType, registerEnumType } from '@nestjs/graphql';`,
|
||||
'',
|
||||
@@ -374,10 +374,6 @@ export const USER_FRIENDLY_ERRORS = {
|
||||
args: { spaceId: 'string' },
|
||||
message: ({ spaceId }) => `Owner of Space ${spaceId} not found.`,
|
||||
},
|
||||
cant_change_space_owner: {
|
||||
type: 'action_forbidden',
|
||||
message: 'You are not allowed to change the owner of a Space.',
|
||||
},
|
||||
doc_not_found: {
|
||||
type: 'resource_not_found',
|
||||
args: { spaceId: 'string', docId: 'string' },
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* eslint-disable */
|
||||
/* oxlint-disable */
|
||||
// AUTO GENERATED FILE
|
||||
import { createUnionType, Field, ObjectType, registerEnumType } from '@nestjs/graphql';
|
||||
|
||||
@@ -240,12 +240,6 @@ export class SpaceOwnerNotFound extends UserFriendlyError {
|
||||
super('internal_server_error', 'space_owner_not_found', message, args);
|
||||
}
|
||||
}
|
||||
|
||||
export class CantChangeSpaceOwner extends UserFriendlyError {
|
||||
constructor(message?: string) {
|
||||
super('action_forbidden', 'cant_change_space_owner', message);
|
||||
}
|
||||
}
|
||||
@ObjectType()
|
||||
class DocNotFoundDataType {
|
||||
@Field() spaceId!: string
|
||||
@@ -630,7 +624,6 @@ export enum ErrorNames {
|
||||
ALREADY_IN_SPACE,
|
||||
SPACE_ACCESS_DENIED,
|
||||
SPACE_OWNER_NOT_FOUND,
|
||||
CANT_CHANGE_SPACE_OWNER,
|
||||
DOC_NOT_FOUND,
|
||||
DOC_ACCESS_DENIED,
|
||||
VERSION_REJECTED,
|
||||
|
||||
Reference in New Issue
Block a user