Updated the method of api key creation.

ref #56
This commit is contained in:
2020-12-29 20:49:45 +01:00
parent c4270b0839
commit 04813173e4
3 changed files with 35 additions and 4 deletions

View File

@@ -3,6 +3,8 @@ import {
IsInt,
IsNotEmpty,
IsOptional,
IsString
} from "class-validator";
@@ -39,6 +41,13 @@ export class ResponseStatsClient {
@IsOptional()
key: string;
/**
* The client's api key prefix.
*/
@IsString()
@IsNotEmpty()
prefix: string;
/**
* Creates a ResponseStatsClient object from a statsClient.
* @param client The statsClient the response shall be build for.
@@ -47,6 +56,7 @@ export class ResponseStatsClient {
this.id = client.id;
this.description = client.description;
this.enabled = client.enabled;
this.prefix = client.prefix;
this.key = "Only visible on creation/update.";
}
}