Refactor /schedules/{scheduleID} endpoints (post)
All checks were successful
Java CI with Maven / build (push) Successful in 47s

This commit is contained in:
Sebastian Böckelmann 2023-11-11 15:51:56 +01:00
parent e36bbb0d65
commit 59aaddf789
3 changed files with 9 additions and 9 deletions

View File

@ -324,12 +324,12 @@ export class ScheduleService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
public schedulesScheduleIDBasicPost(scheduleID: number, basicScheduleFieldInfo?: BasicScheduleFieldInfo, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<SimpleStatusResponse>;
public schedulesScheduleIDBasicPost(scheduleID: number, basicScheduleFieldInfo?: BasicScheduleFieldInfo, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpResponse<SimpleStatusResponse>>;
public schedulesScheduleIDBasicPost(scheduleID: number, basicScheduleFieldInfo?: BasicScheduleFieldInfo, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpEvent<SimpleStatusResponse>>;
public schedulesScheduleIDBasicPost(scheduleID: number, basicScheduleFieldInfo?: BasicScheduleFieldInfo, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any> {
public schedulesScheduleIDPost(scheduleID: number, basicScheduleFieldInfo?: BasicScheduleFieldInfo, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<ScheduleInfo>;
public schedulesScheduleIDPost(scheduleID: number, basicScheduleFieldInfo?: BasicScheduleFieldInfo, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpResponse<ScheduleInfo>>;
public schedulesScheduleIDPost(scheduleID: number, basicScheduleFieldInfo?: BasicScheduleFieldInfo, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpEvent<ScheduleInfo>>;
public schedulesScheduleIDPost(scheduleID: number, basicScheduleFieldInfo?: BasicScheduleFieldInfo, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any> {
if (scheduleID === null || scheduleID === undefined) {
throw new Error('Required parameter scheduleID was null or undefined when calling schedulesScheduleIDBasicPost.');
throw new Error('Required parameter scheduleID was null or undefined when calling schedulesScheduleIDPost.');
}
let localVarHeaders = this.defaultHeaders;
@ -373,7 +373,7 @@ export class ScheduleService {
responseType_ = 'text';
}
return this.httpClient.post<SimpleStatusResponse>(`${this.configuration.basePath}/schedules/${encodeURIComponent(String(scheduleID))}/basic`,
return this.httpClient.post<ScheduleInfo>(`${this.configuration.basePath}/schedules/${encodeURIComponent(String(scheduleID))}`,
basicScheduleFieldInfo,
{
context: localVarHttpContext,

View File

@ -43,7 +43,7 @@ export class BasicSchedulerComponent implements OnChanges{
}
})
} else {
this.scheduleService.schedulesScheduleIDBasicPost(this.scheduleEntityInfo!.scheduleID, {
this.scheduleService.schedulesScheduleIDPost(this.scheduleEntityInfo!.scheduleID, {
scheduleDate: this.dateCtrl.value
}).subscribe({
next: resp => {

View File

@ -1351,7 +1351,7 @@ paths:
schema:
type: object
$ref: "#/components/schemas/SimpleStatusResponse"
/schedules/{scheduleID}/basic:
/schedules/{scheduleID}:
post:
security:
- API_TOKEN: []
@ -1379,7 +1379,7 @@ paths:
application/json:
schema:
type: object
$ref: '#/components/schemas/SimpleStatusResponse'
$ref: '#/components/schemas/ScheduleInfo'
403:
description: No permission
content: