Drop await usage for now-synchronous encodeFileToken() (#11612)

### Remove unnecessary `await` from `encodeFileToken` calls (now
synchronous) #11611

####  Context

In [PR #11385 – commit
26c17f3](26c17f3205),
`FileService.encodeFileToken()` was updated to be a **synchronous**
method. However, several places in the codebase were still calling it
using `await`.

####  Changes 
This PR cleans up those redundant `await` usages to:
- Improve clarity
- Avoid confusion (no longer awaiting a non-Promise)
- Slightly reduce overhead in affected functions
- Removed `await` from calls to `this.fileService.encodeFileToken(...)`
This commit is contained in:
Vaibhav Devere
2025-04-17 14:25:54 +05:30
committed by GitHub
parent 9e9ba73a43
commit 6023bda579
6 changed files with 10 additions and 10 deletions

View File

@ -53,7 +53,7 @@ export class ActivityQueryResultGetterHandler
imageUrl.searchParams.delete('token');
const signedPayload = await this.fileService.encodeFileToken({
const signedPayload = this.fileService.encodeFileToken({
noteBlockId: block.id,
workspaceId: workspaceId,
});

View File

@ -16,7 +16,7 @@ export class AttachmentQueryResultGetterHandler
return attachment;
}
const signedPayload = await this.fileService.encodeFileToken({
const signedPayload = this.fileService.encodeFileToken({
attachmentId: attachment.id,
workspaceId: workspaceId,
});

View File

@ -16,7 +16,7 @@ export class PersonQueryResultGetterHandler
return person;
}
const signedPayload = await this.fileService.encodeFileToken({
const signedPayload = this.fileService.encodeFileToken({
personId: person.id,
workspaceId: workspaceId,
});