fix: can get null for nullable request

This commit is contained in:
Polianin Nikita 2024-06-06 23:31:34 +03:00
parent b388fb039a
commit a7d48f3deb
2 changed files with 4 additions and 10 deletions

View File

@ -9,7 +9,7 @@ import {ScheduleConfigurationRequest} from "@api/v1/scheduleConfigurationRequest
@Injectable() @Injectable()
export default class SetupService extends ApiService { export default class SetupService extends ApiService {
protected basePath = 'v1/Setup/'; protected basePath = 'Setup/';
protected version = AvailableVersion.v1; protected version = AvailableVersion.v1;
public checkToken(token: string) { public checkToken(token: string) {
@ -24,7 +24,7 @@ export default class SetupService extends ApiService {
return this.post<boolean>('SetMysql', data); return this.post<boolean>('SetMysql', data);
} }
public setSqlite(path: string) { public setSqlite(path: string | null = null) {
return this.post<boolean>('SetSqlite', null, {path: path}); return this.post<boolean>('SetSqlite', null, {path: path});
} }
@ -40,11 +40,11 @@ export default class SetupService extends ApiService {
return this.post<boolean>('CreateAdmin', data); return this.post<boolean>('CreateAdmin', data);
} }
public setLogging(data: LoggingRequest) { public setLogging(data: LoggingRequest | null = null) {
return this.post<boolean>('SetLogging', data); return this.post<boolean>('SetLogging', data);
} }
public setEmail(data: EmailRequest) { public setEmail(data: EmailRequest | null = null) {
return this.post<boolean>('SetEmail', data); return this.post<boolean>('SetEmail', data);
} }

View File

@ -9,8 +9,6 @@
* https://github.com/swagger-api/swagger-codegen.git * https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually. * Do not edit the class manually.
*/ */
import {PairPeriodTime} from "@model/pairPeriodTime";
/** /**
* Represents a request to configure the schedule settings. * Represents a request to configure the schedule settings.
*/ */
@ -23,8 +21,4 @@ export interface ScheduleConfigurationRequest {
* Gets or sets the start date of the term. * Gets or sets the start date of the term.
*/ */
startTerm: string; startTerm: string;
/**
* Gets or sets the pair period times, keyed by pair number.
*/
pairPeriod: { [key: string]: PairPeriodTime; };
} }