mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-15 23:54:42 -04:00
UserService: Improve method naming
This renames `createOrUpdateHistoryEntry` to `updateHistoryEntryTimestamp`, which reduces confusion with the similarly named `updateHistoryEntry` function. Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
parent
e65c19ddd8
commit
3396d3e47d
6 changed files with 16 additions and 16 deletions
|
@ -96,7 +96,7 @@ describe('Me', () => {
|
|||
it(`GET /me/history`, async () => {
|
||||
const noteName = 'testGetNoteHistory1';
|
||||
const note = await notesService.createNote('', noteName);
|
||||
const createdHistoryEntry = await historyService.createOrUpdateHistoryEntry(
|
||||
const createdHistoryEntry = await historyService.updateHistoryEntryTimestamp(
|
||||
note,
|
||||
user,
|
||||
);
|
||||
|
@ -123,7 +123,7 @@ describe('Me', () => {
|
|||
const noteName = 'testGetNoteHistory2';
|
||||
const note = await notesService.createNote('', noteName);
|
||||
const createdHistoryEntry =
|
||||
await historyService.createOrUpdateHistoryEntry(note, user);
|
||||
await historyService.updateHistoryEntryTimestamp(note, user);
|
||||
const response = await request(app.getHttpServer())
|
||||
.get(`/me/history/${noteName}`)
|
||||
.expect('Content-Type', /json/)
|
||||
|
@ -151,7 +151,7 @@ describe('Me', () => {
|
|||
it('works', async () => {
|
||||
const noteName = 'testGetNoteHistory3';
|
||||
const note = await notesService.createNote('', noteName);
|
||||
await historyService.createOrUpdateHistoryEntry(note, user);
|
||||
await historyService.updateHistoryEntryTimestamp(note, user);
|
||||
const historyEntryUpdateDto = new HistoryEntryUpdateDto();
|
||||
historyEntryUpdateDto.pinStatus = true;
|
||||
const response = await request(app.getHttpServer())
|
||||
|
@ -181,7 +181,7 @@ describe('Me', () => {
|
|||
it('works', async () => {
|
||||
const noteName = 'testGetNoteHistory4';
|
||||
const note = await notesService.createNote('', noteName);
|
||||
await historyService.createOrUpdateHistoryEntry(note, user);
|
||||
await historyService.updateHistoryEntryTimestamp(note, user);
|
||||
const response = await request(app.getHttpServer())
|
||||
.delete(`/me/history/${noteName}`)
|
||||
.expect(204);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue