mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-24 20:14:35 -04:00
fix: format code
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
parent
d75d406e67
commit
34bf8f16b1
14 changed files with 46 additions and 22 deletions
|
@ -37,10 +37,12 @@ export const userCanEdit = (
|
|||
const mayWriteViaGroupPermission =
|
||||
!!user &&
|
||||
permissions.sharedToGroups.some(
|
||||
(value) => value.groupName === SpecialGroup.LOGGED_IN && value.canEdit
|
||||
(value) =>
|
||||
value.groupName === (SpecialGroup.LOGGED_IN as string) && value.canEdit
|
||||
)
|
||||
const everyoneMayWriteViaGroupPermission = permissions.sharedToGroups.some(
|
||||
(value) => value.groupName === SpecialGroup.EVERYONE && value.canEdit
|
||||
(value) =>
|
||||
value.groupName === (SpecialGroup.EVERYONE as string) && value.canEdit
|
||||
)
|
||||
return (
|
||||
isOwner ||
|
||||
|
|
|
@ -68,6 +68,7 @@ export class RealtimeDoc extends EventEmitter2<RealtimeDocEvents> {
|
|||
* @return The current note content.
|
||||
*/
|
||||
public getCurrentContent(): string {
|
||||
// eslint-disable-next-line @typescript-eslint/no-base-to-string
|
||||
return this.getMarkdownContentChannel().toString()
|
||||
}
|
||||
|
||||
|
|
|
@ -29,12 +29,15 @@ describe('y-doc-sync-adapter', () => {
|
|||
const textClient2 = docClient2.getMarkdownContentChannel()
|
||||
|
||||
textServer.observe(() =>
|
||||
// eslint-disable-next-line @typescript-eslint/no-base-to-string
|
||||
console.log('textServer', new Date(), textServer.toString())
|
||||
)
|
||||
textClient1.observe(() =>
|
||||
// eslint-disable-next-line @typescript-eslint/no-base-to-string
|
||||
console.log('textClient1', new Date(), textClient1.toString())
|
||||
)
|
||||
textClient2.observe(() =>
|
||||
// eslint-disable-next-line @typescript-eslint/no-base-to-string
|
||||
console.log('textClient2', new Date(), textClient2.toString())
|
||||
)
|
||||
|
||||
|
@ -206,8 +209,11 @@ describe('y-doc-sync-adapter', () => {
|
|||
textClient1.insert(0, 'test3')
|
||||
textClient2.insert(0, 'test4')
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-base-to-string
|
||||
expect(textServer.toString()).toBe('test4test3test2This is a test note')
|
||||
// eslint-disable-next-line @typescript-eslint/no-base-to-string
|
||||
expect(textClient1.toString()).toBe('test4test3test2This is a test note')
|
||||
// eslint-disable-next-line @typescript-eslint/no-base-to-string
|
||||
expect(textClient2.toString()).toBe('test4test3test2This is a test note')
|
||||
|
||||
docServer.destroy()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue