Optimize metadata queries (#7013)
In this PR: 1. Refactor guards to avoid duplicated queries: WorkspaceAuthGuard and UserAuthGuard only check for existence of workspace and user in the request without querying the database
This commit is contained in:
committed by
Charles Bochet
parent
cf8b1161cc
commit
523df5398a
@ -60,10 +60,10 @@ export class WorkspaceMigrationService {
|
||||
workspaceId: string,
|
||||
migration: WorkspaceMigrationEntity,
|
||||
) {
|
||||
await this.workspaceMigrationRepository.save({
|
||||
id: migration.id,
|
||||
appliedAt: new Date(),
|
||||
});
|
||||
await this.workspaceMigrationRepository.update(
|
||||
{ id: migration.id, workspaceId },
|
||||
{ appliedAt: new Date() },
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user