diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2018-04-07 13:03:19 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2018-04-07 13:03:19 +0900 |
| commit | ddced43ec7251fccaf915028df5d3b25399a4499 (patch) | |
| tree | 8cd96373981f523967926b6014c640e2b48c00d3 /src/models | |
| parent | Ignore post that not public (diff) | |
| parent | Merge pull request #1410 from akihikodaki/objec (diff) | |
| download | misskey-ddced43ec7251fccaf915028df5d3b25399a4499.tar.gz misskey-ddced43ec7251fccaf915028df5d3b25399a4499.tar.bz2 misskey-ddced43ec7251fccaf915028df5d3b25399a4499.zip | |
Merge branch 'master' into refactor
Diffstat (limited to 'src/models')
| -rw-r--r-- | src/models/user.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/models/user.ts b/src/models/user.ts index 7c1ee498d6..92091c6879 100644 --- a/src/models/user.ts +++ b/src/models/user.ts @@ -21,7 +21,7 @@ type IUserBase = { deletedAt: Date; followersCount: number; followingCount: number; - name: string; + name?: string; postsCount: number; driveCapacity: number; username: string; @@ -99,7 +99,7 @@ export function validatePassword(password: string): boolean { return typeof password == 'string' && password != ''; } -export function isValidName(name: string): boolean { +export function isValidName(name?: string): boolean { return name === null || (typeof name == 'string' && name.length < 30 && name.trim() != ''); } |