mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-22 20:46:38 +08:00
fix(server): only return workspace user fields (#10700)
close CLOUD-164
This commit is contained in:
@@ -11,21 +11,9 @@ import {
|
||||
WrongSignInMethod,
|
||||
} from '../base';
|
||||
import { BaseModel } from './base';
|
||||
import { WorkspaceRole } from './common';
|
||||
import { publicUserSelect, WorkspaceRole, workspaceUserSelect } from './common';
|
||||
import type { Workspace } from './workspace';
|
||||
|
||||
const publicUserSelect = {
|
||||
id: true,
|
||||
name: true,
|
||||
avatarUrl: true,
|
||||
} satisfies Prisma.UserSelect;
|
||||
const workspaceUserSelect = {
|
||||
id: true,
|
||||
name: true,
|
||||
email: true,
|
||||
avatarUrl: true,
|
||||
} satisfies Prisma.UserSelect;
|
||||
|
||||
type CreateUserInput = Omit<Prisma.UserCreateInput, 'name'> & { name?: string };
|
||||
type UpdateUserInput = Omit<Partial<Prisma.UserCreateInput>, 'id'>;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user