Moved all update() and toEntity action model functions to async
ref #76
This commit is contained in:
@@ -56,7 +56,7 @@ export class CreateAddress {
|
||||
/**
|
||||
* Creates a new Address entity from this.
|
||||
*/
|
||||
public toEntity(): Address {
|
||||
public async toEntity(): Promise<Address> {
|
||||
let newAddress: Address = new Address();
|
||||
|
||||
newAddress.address1 = this.address1;
|
||||
|
||||
@@ -37,7 +37,7 @@ export class CreateRunnerTeam extends CreateRunnerGroup {
|
||||
/**
|
||||
* Creates a new RunnerTeam entity from this.
|
||||
*/
|
||||
public async toRunnerTeam(): Promise<RunnerTeam> {
|
||||
public async toEntity(): Promise<RunnerTeam> {
|
||||
let newRunnerTeam: RunnerTeam = new RunnerTeam();
|
||||
|
||||
newRunnerTeam.name = this.name;
|
||||
|
||||
@@ -37,7 +37,7 @@ export class UpdateTrack {
|
||||
* Update a Track entity based on this.
|
||||
* @param track The track that shall be updated.
|
||||
*/
|
||||
public update(track: Track): Track {
|
||||
public async update(track: Track): Promise<Track> {
|
||||
track.name = this.name;
|
||||
track.distance = this.distance;
|
||||
track.minimumLapTime = this.minimumLapTime;
|
||||
|
||||
Reference in New Issue
Block a user