Login working and prepare LoginResponse class and associated types

This commit is contained in:
Casper Warden
2017-11-21 15:09:26 +00:00
parent 19d2ef1bec
commit e529b3c993
25 changed files with 3931 additions and 9 deletions

34
lib/structs/UUID.ts Normal file
View File

@@ -0,0 +1,34 @@
import * as validator from 'validator';
export class UUID
{
private mUUID = '00000000-0000-0000-0000-000000000000';
static zero(): UUID
{
return new UUID();
}
constructor(val?: string)
{
if (val !== undefined)
{
this.setUUID(val);
}
}
public setUUID(val: string): boolean
{
if (validator.isUUID(val, 4))
{
this.mUUID = val;
return true;
}
return false;
}
public toString = (): string =>
{
return this.mUUID;
}
}