-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BC-8403 Code improvements #43
Conversation
…ul-cloud/tldraw-server into BC-8403-code-improvments
…ul-cloud/tldraw-server into BC-8403-code-improvments
…ul-cloud/tldraw-server into BC-8403-code-improvments
import { RedisService } from '../../../infra/redis/redis.service.js'; | ||
import { StorageService } from '../../../infra/storage/storage.service.js'; | ||
import { registerYWebsocketServer } from '../../../infra/y-redis/ws.service.js'; | ||
import { RedisAdapter } from '../../../infra/redis/interfaces/redis-adapter.js'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
index.ts files für das y-redis module und redis Module wären Goldwert um die Imports übersichtlicher zu machen und aufzuzeigen was man von dort überhaupt verwenden darf. So ist es beim Review nicht möglich und man muss davon ausgehen das alles nutzbar ist.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wird im nächstem Ticket aufgeräumt!!!
…esponse for users without write access or missing room
…rties and update related factories and tests
import { isSmallerRedisId } from './helper.js'; | ||
import { DocumentStorage } from './storage.js'; | ||
import { YRedisClient } from './y-redis.client.js'; | ||
|
||
export const running = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
@@ -66,8 +68,7 @@ describe('Websocket Api Test', () => { | |||
describe('when clients have permission for room', () => { | |||
describe('when two clients connect to the same doc before any changes', () => { | |||
const setup = () => { | |||
const randomString = Math.random().toString(36).substring(7); | |||
const room = randomString; | |||
const room = Math.random().toString(36).substring(7); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kann der obige Kommentar (evtl. gerade eingeklappt) nicht weg?
/* const waitUntilDocValueMatches = (ydoc: Doc, key: string, value: number): Promise<void> =>
promise.until(0, () => {
const result = ydoc.getMap().get(key);
const isMatch = result === value;
return isMatch;
}); */
Bzw. scheinen hier auch noch mehrere Kommentare zu sein, die eventuell weg könnten?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wird im nächstem Ticket aufgeräumt!!!
import { RedisService } from '../../../infra/redis/redis.service.js'; | ||
import { StorageService } from '../../../infra/storage/storage.service.js'; | ||
import { registerYWebsocketServer } from '../../../infra/y-redis/ws.service.js'; | ||
import { RedisAdapter } from '../../../infra/redis/interfaces/redis-adapter.js'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
…nd implement OnModuleDestroy for cleanup
Quality Gate passedIssues Measures |
Description
Links to Tickets or other pull requests
Changes
Datasecurity
Deployment
New Repos, NPM pakages or vendor scripts
Screenshots of UI changes
Approval for review