mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-02-10 15:31:20 +00:00
PrivateAPI: Rename HistoryEntryCreationDto to HistoryEntryImportDto
As the DTO is used to import a whole list of history entries rather than creating a single history entry (there is no way of doing that at the moment) Signed-off-by: Philip Molares <philip.molares@udo.edu>
This commit is contained in:
parent
b36ce1bb08
commit
085241999b
3 changed files with 5 additions and 5 deletions
|
@ -19,7 +19,7 @@ import { UsersService } from '../../../../users/users.service';
|
|||
import { NotesService } from '../../../../notes/notes.service';
|
||||
import { HistoryEntryDto } from '../../../../history/history-entry.dto';
|
||||
import { NotInDBError } from '../../../../errors/errors';
|
||||
import { HistoryEntryCreationDto } from '../../../../history/history-entry-creation.dto';
|
||||
import { HistoryEntryImportDto } from '../../../../history/history-entry-import.dto';
|
||||
import { HistoryEntryUpdateDto } from '../../../../history/history-entry-update.dto';
|
||||
import { ConsoleLoggerService } from '../../../../logger/console-logger.service';
|
||||
import { HistoryService } from '../../../../history/history.service';
|
||||
|
@ -55,7 +55,7 @@ export class HistoryController {
|
|||
|
||||
@Post()
|
||||
async setHistory(
|
||||
@Body('history') history: HistoryEntryCreationDto[],
|
||||
@Body('history') history: HistoryEntryImportDto[],
|
||||
): Promise<void> {
|
||||
try {
|
||||
// ToDo: use actual user here
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
import { IsString } from 'class-validator';
|
||||
|
||||
export class HistoryEntryCreationDto {
|
||||
export class HistoryEntryImportDto {
|
||||
/**
|
||||
* ID or Alias of the note
|
||||
*/
|
|
@ -31,7 +31,7 @@ import { UsersModule } from '../../src/users/users.module';
|
|||
import { PrivateApiModule } from '../../src/api/private/private-api.module';
|
||||
import { HistoryService } from '../../src/history/history.service';
|
||||
import { Note } from '../../src/notes/note.entity';
|
||||
import { HistoryEntryCreationDto } from '../../src/history/history-entry-creation.dto';
|
||||
import { HistoryEntryImportDto } from '../../src/history/history-entry-import.dto';
|
||||
|
||||
describe('History', () => {
|
||||
let app: INestApplication;
|
||||
|
@ -105,7 +105,7 @@ describe('History', () => {
|
|||
});
|
||||
|
||||
it('POST /me/history', async () => {
|
||||
const postEntryDto = new HistoryEntryCreationDto();
|
||||
const postEntryDto = new HistoryEntryImportDto();
|
||||
postEntryDto.note = note2.alias;
|
||||
await request(app.getHttpServer())
|
||||
.post('/me/history')
|
||||
|
|
Loading…
Reference in a new issue