diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2019-07-22 10:18:27 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2019-07-22 10:18:27 +0900 |
| commit | 29469bb7c633b389121ccc3ac9502a310f1c3d60 (patch) | |
| tree | 957abc8a3154996eb2de10caa5a96f2149d881fc | |
| parent | Update signup.ts (diff) | |
| download | sharkey-29469bb7c633b389121ccc3ac9502a310f1c3d60.tar.gz sharkey-29469bb7c633b389121ccc3ac9502a310f1c3d60.tar.bz2 sharkey-29469bb7c633b389121ccc3ac9502a310f1c3d60.zip | |
Better error
| -rw-r--r-- | src/server/api/private/signup.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/server/api/private/signup.ts b/src/server/api/private/signup.ts index b8793582fd..d535d49836 100644 --- a/src/server/api/private/signup.ts +++ b/src/server/api/private/signup.ts @@ -117,7 +117,7 @@ export default async (ctx: Koa.BaseContext) => { host: null }); - if (exist) throw 'already registered'; + if (exist) throw new Error(' the username is already used'); account = await transactionalEntityManager.save(new User({ id: genId(), |