add new endpoint to save and get draft

This commit is contained in:
Peter Maquiran
2024-09-12 18:57:45 +01:00
parent 38f51bd7e1
commit 82d6a15d5e
10 changed files with 118 additions and 66 deletions
@@ -10,6 +10,7 @@ import { EventListOutputDTO } from '../dto/eventListDTOOutput';
import { HttpService } from 'src/app/services/http.service';
import { TracingType } from 'src/app/services/monitoring/opentelemetry/tracer';
import { IGetDraftListByProcessIdOutput, IGetDraftListByProcessIdSchema } from '../../domain/usecase/getDraft-list-by-process-id.service';
import { IDraftSaveByIdInput } from '../../domain/usecase/draft-save-by-id-use-case.service';
@Injectable({
providedIn: 'root'
@@ -135,4 +136,8 @@ export class AgendaDataService {
async getDraftListByProcessId(input: IGetDraftListByProcessIdSchema) {
return await this.httpService.get<IGetDraftListByProcessIdOutput>(`${this.baseUrl}/Contents/FolderId/${input.processId}`);
}
async draftSaveById(input: IDraftSaveByIdInput) {
return await this.httpService.put<IGetDraftListByProcessIdOutput>(`${this.baseUrl}/Contents/${input.id}`, input);
}
}