feat: rename comment thread into activity (#939)
* feat: rename commentThread into activity server * feat: rename commentThread into activity front * feat: migration only create tables feat: migration only create tables * Update activities * fix: rebase partial fix * fix: all rebase problems and drop activity target alter * fix: lint * Update migration * Update migration * Fix conflicts * Fix conflicts --------- Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
@@ -42,16 +42,12 @@ export class CreateAttachmentAbilityHandler implements IAbilityHandler {
|
||||
const args = gqlContext.getArgs<AttachmentArgs>();
|
||||
assert(args.activityId, '', ForbiddenException);
|
||||
|
||||
const activity = await this.prismaService.client.commentThread.findUnique({
|
||||
const activity = await this.prismaService.client.activity.findUnique({
|
||||
where: { id: args.activityId },
|
||||
include: { workspace: true },
|
||||
});
|
||||
assert(activity, '', NotFoundException);
|
||||
|
||||
return ability.can(
|
||||
AbilityAction.Update,
|
||||
subject('Workspace', activity.workspace),
|
||||
);
|
||||
return ability.can(AbilityAction.Update, subject('Activity', activity));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user