mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-11 23:26:30 +08:00
test(server): move tests out of src folder (#4366)
This commit is contained in:
@@ -26,7 +26,6 @@ import {
|
||||
Resolver,
|
||||
} from '@nestjs/graphql';
|
||||
import type { User, Workspace } from '@prisma/client';
|
||||
// @ts-expect-error graphql-upload is not typed
|
||||
import GraphQLUpload from 'graphql-upload/GraphQLUpload.mjs';
|
||||
import { applyUpdate, Doc } from 'yjs';
|
||||
|
||||
@@ -648,10 +647,10 @@ export class WorkspaceResolver {
|
||||
workspaceId,
|
||||
},
|
||||
});
|
||||
return (
|
||||
userWorkspace?.accepted &&
|
||||
(await this.permissions.grantPage(workspaceId, pageId))
|
||||
);
|
||||
if (!userWorkspace?.accepted) {
|
||||
throw new ForbiddenException('Permission denied');
|
||||
}
|
||||
return this.permissions.grantPage(workspaceId, pageId);
|
||||
}
|
||||
|
||||
@Mutation(() => Boolean)
|
||||
|
||||
Reference in New Issue
Block a user