mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-20 10:15:17 -04:00
Rename getNoteContentByNote to getNoteContent
Signed-off-by: Yannick Bungers <git@innay.de>
This commit is contained in:
parent
15a1a138ee
commit
e081bd196b
4 changed files with 8 additions and 8 deletions
|
@ -180,7 +180,7 @@ describe('NotesService', () => {
|
|||
});
|
||||
});
|
||||
|
||||
describe('getNoteContentByNote', () => {
|
||||
describe('getNoteContent', () => {
|
||||
it('works', async () => {
|
||||
const content = 'testContent';
|
||||
jest
|
||||
|
@ -189,7 +189,7 @@ describe('NotesService', () => {
|
|||
const newNote = await service.createNote(content);
|
||||
const revisions = await newNote.revisions;
|
||||
jest.spyOn(revisionRepo, 'findOne').mockResolvedValueOnce(revisions[0]);
|
||||
service.getNoteContentByNote(newNote).then((result) => {
|
||||
service.getNoteContent(newNote).then((result) => {
|
||||
expect(result).toEqual(content);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -112,7 +112,7 @@ export class NotesService {
|
|||
* @param {Note} note - the note to use
|
||||
* @return {string} the content of the note
|
||||
*/
|
||||
async getNoteContentByNote(note: Note): Promise<string> {
|
||||
async getNoteContent(note: Note): Promise<string> {
|
||||
return (await this.getLatestRevision(note)).content;
|
||||
}
|
||||
|
||||
|
@ -349,7 +349,7 @@ export class NotesService {
|
|||
*/
|
||||
async toNoteDto(note: Note): Promise<NoteDto> {
|
||||
return {
|
||||
content: await this.getNoteContentByNote(note),
|
||||
content: await this.getNoteContent(note),
|
||||
metadata: await this.toNoteMetadataDto(note),
|
||||
editedByAtPosition: [],
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue