mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-12 07:36:42 +08:00
feat(server): support team workspace subscription (#8919)
close AF-1724, AF-1722
This commit is contained in:
@@ -5,7 +5,6 @@ import {
|
||||
Int,
|
||||
Mutation,
|
||||
Query,
|
||||
ResolveField,
|
||||
Resolver,
|
||||
} from '@nestjs/graphql';
|
||||
import { PrismaClient } from '@prisma/client';
|
||||
@@ -37,7 +36,6 @@ import {
|
||||
@Resolver(() => UserType)
|
||||
export class UserResolver {
|
||||
constructor(
|
||||
private readonly prisma: PrismaClient,
|
||||
private readonly storage: AvatarStorage,
|
||||
private readonly users: UserService
|
||||
) {}
|
||||
@@ -72,16 +70,6 @@ export class UserResolver {
|
||||
};
|
||||
}
|
||||
|
||||
@ResolveField(() => Int, {
|
||||
name: 'invoiceCount',
|
||||
description: 'Get user invoice count',
|
||||
})
|
||||
async invoiceCount(@CurrentUser() user: CurrentUser) {
|
||||
return this.prisma.userInvoice.count({
|
||||
where: { userId: user.id },
|
||||
});
|
||||
}
|
||||
|
||||
@Mutation(() => UserType, {
|
||||
name: 'uploadAvatar',
|
||||
description: 'Upload user avatar',
|
||||
|
||||
@@ -37,4 +37,4 @@ import {
|
||||
})
|
||||
export class WorkspaceModule {}
|
||||
|
||||
export type { InvitationType, WorkspaceType } from './types';
|
||||
export { InvitationType, WorkspaceType } from './types';
|
||||
|
||||
Reference in New Issue
Block a user