summaryrefslogtreecommitdiff
path: root/src/models
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-04-07 13:03:19 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-04-07 13:03:19 +0900
commitddced43ec7251fccaf915028df5d3b25399a4499 (patch)
tree8cd96373981f523967926b6014c640e2b48c00d3 /src/models
parentIgnore post that not public (diff)
parentMerge pull request #1410 from akihikodaki/objec (diff)
downloadmisskey-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.ts4
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() != '');
}