mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-24 10:46:30 -05:00
Rename viewcount to viewCount for compliance
Signed-off-by: Yannick Bungers <git@innay.de>
This commit is contained in:
parent
4d89ffd474
commit
8873ac316a
4 changed files with 8 additions and 8 deletions
|
@ -7,7 +7,7 @@ entity "note" {
|
|||
--
|
||||
*shortid : text
|
||||
alias : text
|
||||
*viewcount : number
|
||||
*viewCount : number
|
||||
*ownerId : uuid <<FK user>>
|
||||
description: text
|
||||
title: text
|
||||
|
|
|
@ -47,7 +47,7 @@ export class Note {
|
|||
nullable: false,
|
||||
default: 0,
|
||||
})
|
||||
viewcount: number;
|
||||
viewCount: number;
|
||||
@ManyToOne((_) => User, (user) => user.ownedNotes, { onDelete: 'CASCADE' })
|
||||
owner: User;
|
||||
@OneToMany((_) => Revision, (revision) => revision.note, { cascade: true })
|
||||
|
@ -80,7 +80,7 @@ export class Note {
|
|||
const newNote = new Note();
|
||||
newNote.shortid = shortid;
|
||||
newNote.alias = alias;
|
||||
newNote.viewcount = 0;
|
||||
newNote.viewCount = 0;
|
||||
newNote.owner = owner;
|
||||
newNote.authorColors = [];
|
||||
newNote.userPermissions = [];
|
||||
|
|
|
@ -701,7 +701,7 @@ describe('NotesService', () => {
|
|||
notes: [note],
|
||||
},
|
||||
];
|
||||
note.viewcount = 1337;
|
||||
note.viewCount = 1337;
|
||||
const metadataDto = await service.toNoteMetadataDto(note);
|
||||
expect(metadataDto.id).toEqual(note.id);
|
||||
expect(metadataDto.alias).toEqual(note.alias);
|
||||
|
@ -725,7 +725,7 @@ describe('NotesService', () => {
|
|||
expect(metadataDto.tags[0]).toEqual(note.tags[0].name);
|
||||
expect(metadataDto.updateTime).toEqual(revisions[0].createdAt);
|
||||
expect(metadataDto.updateUser.userName).toEqual(user.userName);
|
||||
expect(metadataDto.viewCount).toEqual(note.viewcount);
|
||||
expect(metadataDto.viewCount).toEqual(note.viewCount);
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -795,7 +795,7 @@ describe('NotesService', () => {
|
|||
notes: [note],
|
||||
},
|
||||
];
|
||||
note.viewcount = 1337;
|
||||
note.viewCount = 1337;
|
||||
const noteDto = await service.toNoteDto(note);
|
||||
expect(noteDto.metadata.id).toEqual(note.id);
|
||||
expect(noteDto.metadata.alias).toEqual(note.alias);
|
||||
|
@ -825,7 +825,7 @@ describe('NotesService', () => {
|
|||
expect(noteDto.metadata.tags[0]).toEqual(note.tags[0].name);
|
||||
expect(noteDto.metadata.updateTime).toEqual(revisions[0].createdAt);
|
||||
expect(noteDto.metadata.updateUser.userName).toEqual(user.userName);
|
||||
expect(noteDto.metadata.viewCount).toEqual(note.viewcount);
|
||||
expect(noteDto.metadata.viewCount).toEqual(note.viewCount);
|
||||
expect(noteDto.content).toEqual(content);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -348,7 +348,7 @@ export class NotesService {
|
|||
updateUser: this.usersService.toUserDto(
|
||||
await this.calculateUpdateUser(note),
|
||||
),
|
||||
viewCount: note.viewcount,
|
||||
viewCount: note.viewCount,
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue