mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-19 11:06:25 +08:00
@@ -1,3 +1,4 @@
|
||||
import { PublicUserType } from '../../core/user';
|
||||
import { TestingApp } from './testing-app';
|
||||
|
||||
export async function currentUser(app: TestingApp) {
|
||||
@@ -12,6 +13,25 @@ export async function currentUser(app: TestingApp) {
|
||||
return res.currentUser;
|
||||
}
|
||||
|
||||
export async function getPublicUserById(
|
||||
app: TestingApp,
|
||||
id: string
|
||||
): Promise<PublicUserType | null> {
|
||||
const res = await app.gql(
|
||||
`
|
||||
query getPublicUserById($id: String!) {
|
||||
publicUserById(id: $id) {
|
||||
id
|
||||
name
|
||||
avatarUrl
|
||||
}
|
||||
}
|
||||
`,
|
||||
{ id }
|
||||
);
|
||||
return res.publicUserById;
|
||||
}
|
||||
|
||||
export async function sendChangeEmail(
|
||||
app: TestingApp,
|
||||
email: string,
|
||||
|
||||
Reference in New Issue
Block a user